Qutub Minar is located inside the Qutub Complex which comes under the Qila Rai Pithora, which is 10th century fort of Delhi's last Hindu King Prithviraj Chauhan. After the invasion by Mahumad Ghori and defeat of the hindu king, the fort was captured, the temple was broken down and was converted into a mosque -- which formed the first mosque in Delhi called Quwwat-ul-Islam Mosque.