Ancient and classical periods The
Skanda Purana contains a part titled "Kashi Khanda", while the
Brahmavaivarta Purana includes a portion known as "Kashi Rahasya", both of which are dedicated to the city of
Varanasi. As per the Kashi Khanda, there were a total of 1099 temples, out of which 513 were specifically devoted to the worship of
Shiva. The scripture states that the Vishvanath temple was formerly known as Moksha Lakshmi Vilas. The temple housed a total of five
mandapas (halls). The lingam of Vishwanath was situated in the
garbhagriha (innermost sanctuary). The remaining four mandapas include the
Jnana mandapa located to the east, the
Ranga mandapa to the west, the
Aishvarya mandapa to the north, and the
Mukti mandapa to the south. as well as Madhuri Desai describe that the temple centres around a repetition of destruction and reconstruction.
Medieval period and destruction The original Vishwanath temple, initially known as the Adi Vishveshwar Temple, was destroyed by the
Ghurids in 1194, when
Mu'izz al-Din Muhammad ibn Sam returned to
India and defeated
Jayachandra of
Kannauj near Chandawar and afterwards razed the city of Kashi. In a few years, the
Razia Mosque was constructed in its place. In 1230, the temple was rebuilt near the Avimukteshwara Temple, away from the main site, during the reign of Delhi's Sultan
Iltutmish (1211–1266). It was demolished again during the rule of either
Hussain Shah Sharqi (1447–1458) or
Sikandar Lodi (1489–1517).
Mughal period Raja Man Singh started rebuilding the temple during
Akbar's reign.
Raja Todar Mal furthered the reconstruction of the temple in 1585. In the seventeenth century, during the rule of
Jahangir,
Vir Singh Deo completed the construction of the earlier temple. In 1669, Mughal Emperor
Aurangzeb destroyed the temple and built the
Gyanvapi Mosque in its place. The remains of the erstwhile temple can be seen in the foundation, the columns, and the rear part of the mosque.
Maratha and British period In 1742, the
Maratha ruler
Malhar Rao Holkar devised a plan to demolish the mosque and reconstruct the Vishweshwar temple at the site. However, his plan did not materialise, partly because of the intervention of the
Nawab of Awadh, who was given control of the territory. In 1750, the Maharaja of
Jaipur commissioned a survey of the land around the site with the objective of purchasing land to rebuild the Kashi Vishwanath temple, which in turn failed. In 1780, Malhar Rao's daughter-in-law,
Ahilyabai Holkar, built the present temple adjacent to the mosque. In 1828,
Baiza Bai, widow of the Maratha ruler
Daulat Rao Scindhia of
Gwalior State, built a low-roofed
colonnade with over 40 pillars in the Gyan Vapi precinct. During 1833–1840, at the boundary of Gyanvapi Well, the
ghats (steps by the riverside) and other nearby temples were constructed. Many noble families from various ancestral kingdoms of the Indian subcontinent, and their predecessor states, made generous contributions to the operation of the temple. In 1835,
Maharaja Ranjit Singh of the
Sikh Empire, at the behest of his wife,
Maharani Datar Kaur, donated 1 tonne of gold for plating the temple's dome. In 1841,
Raghuji Bhonsle III of
Nagpur donated silver to the temple. The temple was managed by a hereditary group of
pandits or
mahants. After the death of Mahant Devi Dutt, a dispute arose among his successors. In 1900, his brother-in-law, Pandit Visheshwar Dayal Tewari, filed a lawsuit, which resulted in him being declared the head priest.
Post-Independence Since 1983, the temple has been managed by a board of trustees set up by the government of
Uttar Pradesh. The
Puja of the Maa Shringar Gauri Temple, on the western side of the disputed Gyanvapi Mosque, was restricted after the
demolition of the Babri Masjid in December 1992, due to the ensuing deadly riots that followed the demolition of the mosque. In August 2021, five Hindu women petitioned a local court in Varanasi to be allowed to pray at the Maa Shringar Gauri Temple. speaking at the inauguration of the renovated Kashi Vishwanath Corridor on 13 December 2021. After 239 years, the
Kumbhabhishekham (consecration ceremony) of the temple was held on 5 July 2018, which was conducted by
Nattukottai Nagarathar, a mercantile community of
Tamil Nadu. The Kashi Vishwanath Corridor Project was launched by Prime Minister
Narendra Modi in 2019 to make it easier to travel between the temple and the Ganges River and to create more space to prevent crowding. On 13 December 2021, Modi inaugurated the corridor with a sacred ceremony. A press release by the government said that around 1,400 residents and businesses within the corridor's area were relocated elsewhere and compensated. It also said that more than 40 ruined, centuries-old temples were found and rebuilt, including the Gangeshwar Mahadev temple, the Manokameshwar Mahadev temple, the Jauvinayak temple, and the Shri Kumbha Mahadev temple. In February 2022, the sanctum sanctorum of the temple was gold-plated after an anonymous donor from South India donated 60 kg of gold to the temple. Flowers from the temple are recycled into incense by the biomaterials startup
Phool.co. As of August 2023, the Kashi Vishwanath Temple Trust reported that 10 crore (100 million) tourists had visited the temple since the inauguration of the corridor in December 2021. == Temple complex ==