Patan was established by the Chavda ruler Vanaraja in 8th century as "Anahilapataka". During 10th-13th century, the city served as the capital of the Chaulukyas, who supplanted the Chavdas. Historian Tertius Chandler estimates that Anhilwara (Patan is built on this ancient city) was the tenth-largest city in the world in the year 1000, with a population of approximately 100,000.
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.
The braveness of the Vanaraja Sinh is visible from the fact that he built the state capital on planes of north Gujarat. No hill tops, no huge fortifying. It was said that during his tenure western and northern India has no similar power axis.