Gyanvapi mosque is located in Varanasi, Uttar Pradesh, India. It was constructed by the Mughal Emperor Aurangzeb after he demolished the original Kashi Vishwanath temple at the site.
One can clearly notice the old hindu temple wall mixed into mosque.
There is a small well in the temple called the Jnana Vapi also spelled as Gyaan vapi (the wisdom well). The Jnana Vapi well sites to the north of the main temple and it is believed that the Jyotirlinga was hidden in the well to protect it at the time of invasion.
It is said that the main priest of the temple jumped in the well with the Siva Linga in order to protect it from invaders.
This mosque was built by Aurangzeb in 1669 CE, after destroying the Kasi Viswanath temple located on the site.
The mosque is named after Gyanvapi (“the well of knowledge“), which is situated between the temple and the mosque.
Kasi Viswanath temple existed since many thousands of years and has been reconstructed every few hundreds of years.
The temple structure that existed prior to the construction of the mosque was built by Raja Man Singh during Akbar’s reign.
The temple’s demolition was intended as a warning to the anti-Mughal factions and Hindu religious leaders in the city after few helped Maratha King Sivaji to escape from Agra.
Maratha ruler Malhar Rao Holkar (1693-1766) wanted to demolish the mosque and reconstruct Vishweshwar temple at the site.
However, he never actually did that. Later, in 1780, his daughter-in-law Ahilyabai Holkar constructed the present Kasi Viswanath Temple adjacent to the mosque.
The original Kasi temple is mentioned in Siva, Skanda puranas and original Viswanath temple was destroyed by the army of Qutb-ud-din Aibak in 1194 CE, when he defeated the Raja of Kannauj as a commander of Mohammad Ghori.
It temple was rebuilt by a Gujarati merchant during the reign of Shamsuddin Iltumish (1211-1266 CE).
It was demolished again during the rule of either Hussain Shah Sharqi (1447-1458) or Sikandar Lodhi (1489-1517).
Raja Man Singh built the temple during Akbar’s rule, but orthodox Hindus boycotted it as he had let the Mughal emperors marry within his family. Raja Todar Mal further re-built the temple with Akbar’s funding at its original site in 1585.
Even after Aurangazeb demolishing the original temple and constructing a mosque over it, the remains of the erstwhile temple can be seen in the foundation, the columns and at the rear part of the mosque.
During 1833-1840 CE, the boundary of Gyanvapi Well, the ghats and other nearby temples were constructed.