Patan was a capital of Gujarat in medieval times. It is the administrative seat of Patan District in the Indian state of Gujarat and administered by municipality. The city contains many Hindu and Jain temples as well as few mosques, dargahs and rojas. The city has many historical places also. Patan, an ancient fortified town, was founded in 745 AD by Vanraj Chavda, the most prominent king of the Chavda Kingdom. He named the city Anhilpur Patan or "Anhilwad Patan" after his close friend and Prime Minister Anhil shepherd. It is variously referred to in Sanskrit literature as Anahilpatak, Anahipattan, Anahilpur, Anahilvad Pattan, Pattan etc.
These Chalukya rajputs, with Paramaras of Malwa, the Chauhans of Sakambhari and Chandellas of Kalanjar and Mahoba, were serious contestants for supremacy in northern India. At the zenith of their imperial greatness the bounds of Gujarat were extended to cover Saurashtra and Kutch in the West, Lata in the South, Malwa in the East and Southern Rajasthan in the North. Historian Tertius Chandler estimates that Anhilwara was the tenth-largest city in the world in the year 1000, with a population of approximately 100,000.
When Muizzuddin Muhammad Ghori had attempted to conquer Gujarat, the forces of Mularaja-II, the then King of Patan, a mere boy-ruler, led by his heroic mother Naikidevi, inflicted such a crushing and conclusive defeat on him that the foreigner did not dare again during his life time to cast his greedy eye upon Patan. He never again entered India through Gujarat. The battle was fought at Kayadra, a village near Mount Abu. Muizzuddin's army was completely routed in the conflict, but Somehow he escaped with his defeated army from Gujarat.
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 Alladin Khilji in 1298.
The modern town of Patan later sprung up near the ruins of Anhilwara. During 1304 to 1411, First Patan Was the Gujarat State or Suba Headquarter of Delhi Sultanate and then Capital City of Gujarat Sultanate after the collapse of the Delhi Sultanate at the end of the fourteenth 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 Hindu Kingdom is nearly vanquished and only a wall can be seen on the way from Kalka to Ranaki ni Vaav. In 1411, Sultan Ahmed Shah moved the capital to Ahmedabad.
Patan was part of the Maratha state of Baroda from the mid-eighteenth century until India's independence in 1947, when Baroda became part of Bombay state, which in 1960 was separated into Gujarat and Maharashtra.