A fort and town was established at the foothills of Girnar hill during reign of the Maurya Empire and continued to be used during Gupta period, but it lost its importance when the capital of Saurashtra region was moved from Junagadh to Vallabhi by Maitraka. Chudasamas settled around Junagadh from 875 CE according to bards when they acquired Vamansthali from Chavda ruler. Chudasama ruler Graharipu cleared the old citadel free from the jungle. From the evidence contained in the Hemchandra's Dvyashraya, it can be concluded that Graharipu laid the foundations of the citadel as it now exists. the legend is told about its rediscovery.
Legend
After several Chudasamas of Vamansthali had ruled, a woodcutter one day managed to cut his way through the forest and came to a place where stone walls and a gate existed. Nearby sat a holy man in contemplation, and on being asked by the woodcutter the name of the place and its history, he replied that its name was "Juna" — old. The woodcutter returned by the way he had come to Vamansthali, and reported his discovery to the Chudasama ruler, who ordered the forest to be cleared away. This being done, the fort came into sight. But there was none who knew its history, or who could tell more than the holy man had told the woodcutter. So the place became known as "Junagadh" for want of a better title. If this story is to be believed, either Graharipu rediscovered an ancient stronghold or else after he had built the fort, it was abandoned and afterwards found again by a later ruler Navaghana who transferred Chudasama capital from Vamansthali to Junagadh.
Architecture and places of interest
The Uparkot is one of the most interesting of old forts. The parapets on the east, where the place is commanded by higher ground, have been raised at least three times to give cover against the increasingly long range of projectiles. The entrance is beyond the town in the east wall, and consists of three gateways, one inside the other. The fort walls are from 60 to 70 feet high, forming a massive cluster of buildings. The inner gateway, a beautiful specimen of the Torana, has been topped by more later Indo-Saracenic work. On the rampart above the gate is an inscription of Mandalika III, dated 1450. About 150 yards to the left, through a grove of custard apples, may be seen a huge 10 inch bore cannon of bell-metal, 17 feet long and 4 feet 8 inch round at the mouth. This gun was brought from Diu, where it was left by the Ottoman Turks following their defeat in Siege of Diu. There is an Arabic inscription at the muzzle, which may be translated: "The order to make this cannon, to be used in the service of the Almighty, was given by the Sultan of Arabia and Persia, Sultan Sulaiman, son of Salim Khan. May his triumph be glorified, to punish the enemies of the State and of the Faith, in the capital of Egypt, 1531." At the breech is inscribed: "The work of Muhamman, the son of Hamzah." Another large cannon called Chudanal, also from Diu, in the southern portion of the fort, is 13 feet long, and has a muzzle 4 feet in diameter. This cannons are known by names, Neelam and Manek. Near this is the Jama Masjid, evidently constructed from the materials of a Hindu temple built by Mahmud Begada. One plain slim minaret remains standing, but the mosque is much ruined. The ascent to the terraced roof is by a good staircase outside. The Tomb of Nuri Shah, close to the mosque, is ornamented with fluted cupolas, and a most peculiar carving over the door. There are two Wells in the Uparkot — the Adi Chadi or Adi Kadi Vav, said to have been built in ancient times by the slave girls of the Chudasama rulers, is descended by a long flight of steps ; and the Navghan Kuvo, cut to a great depth in the soft rock, and with a circular staircase. Uparkot Caves are 2nd-3rd century Buddhist caves located in the Uparkot. It is double storyed cave complex used by Buddhist monks during ancient times. Nawabi Lake is a square artificial lake located in the Uparkot.