Gyanvapi mosque was constructed by the Mughal Emperor Aurangzeb in 1669 CE after he had demolished the original Kashi Vishwanath temple that was there at the same site. The presence of the temple can be clearly seen on the walls of the mosque.
Within the precincts exists a small well which is called the Jnana Vapi or the wisdom well. Situated towards the north of the demolished temple the well is of special significance as one of the priests had jumped into the well with the Jyotirlinga of Lord Shiva to protect it from invaders.
The temple structure that existed prior to the construction of the mosque was built by Raja Man Singh during Emperor Akbar’s reign. It destruction was intended to serve as a warning to the anti-Mughal factions and Hindu religious leaders in the city for having helped Maratha chieftain Chatrapati Shivaji Maharaj to escape from Agra. Ahilyabai Holkar constructed the present Kasi Viswanath Temple adjacent to the mosque.
Sarnath - A Quest Within - Buddham Sharnam Gacchami