Patan () is the administrative seat of Patan District in the Indian state of Gujarat and is an administered municipality. It was the capital of Gujarat's Chavda and Chaulukya dynasties in medieval times, and is also known as Anhilpur-Patan to distinguish it from Prabhas Patan. Patan was established by the Chavda king Vanaraja. During the rule of several Hindu and Muslim dynasties, it thrived as a trading city and a regional capital of northern Gujarat. The city contains many Hindu and Jain temples as well as mosques, dargahs and rojas. It is a historical place located on the bank of the now extinct Saraswati River. Patan has an old market which is quite sizeable and is believed to have been in continuous operation since at least the rule of Vaghelas. History Patan was established by the Chavda ruler Vanaraja in the ninth century as "Anahilapataka". During 10th-13th century, the city served as the capital of the Chaulukya dynasty, who succeeded the Chavdas. Muhammed's general and later Sultan of Delhi Qutb-ud-din Aybak sacked the city between 1200 and 1210, and it was destroyed by the Allauddin Khilji in 1298. The modern town of Patan later sprung up near the ruins of Anhilwara. During 1304 to 1411, first Patan was the Suba headquarter of Delhi Sultanate and capital city of the Gujarat Sultanate after the collapse of the Delhi Sultanate at the end of the 14th century. A new fort was built by these Subas, a large portion of which (along with a few of the gates) is still intact. The old fort of the Hindu kingdom is nearly vanished and only a wall can be seen on the way from Kalka to Rani ki vav. In 1411, Sultan Ahmed Shah moved the capital to Ahmedabad. Patan was part of the Baroda state from the mid-18th century until India's independence in 1947, when Baroda became part of Bombay state, which in 1960 was separated into Gujarat and Maharashtra. Rani ki vav During the period of the Chaulukya dynasty or Solankis, the stepwell called the Rani ki vav or Ran-ki vav (Queen's step well) was constructed. It is a richly sculptured monument, built by Udaymati in memory of her husband, Bhima I (1022-1063). It was probably completed by Udaymati and Karna after his death. A reference to Udaymati building the monument is in the 'Prabandha-Chintamani' composed by Merutunga Suri in 1304 AD. It