In the VII-VIII centuries, with outskirts populated by craftsmen and merchants, was that city known as Rabat. From the tenth century, Rabat becomes an important political and economic center of eastern feudal times. The history of the fortress dates to the IX century. Because of its location, Rabat fortress was a significant fortification. Fragments of ruined fortress are preserved only in the tower of the citadel. In XII-XIII centuries, the fortress became the residence of Samtskhe Atabags - Jakeli. It has been restored and expanded. From this comes the place-name Akhaltsikhe (“new fortress”). From the sixteenth century, Samtskhe was conquered by the Ottomans and the process of Islamization of the region began. The Mosques and madrassas, parts of the complex, are buildings of the Ottoman occupation period.
The total area of the fortress is about 7 hectares. The Mosque was built on the territory of Rabat; it is unique in its architecture throughout the Caucasus and was designed by an Italian architect. The Madrasah was built in 1750- it is a typical example of an Ottoman madrasah with an educational center, designed for a large number of disciples.
In 1828, the Russian army at the cost of huge losses wrested Akhaltsikhe from the Ottomans. During these battles Rabat was fully destroyed. The Russian Orthodox turned the Mosque into a chapel, which is proved by the Christian altar, attached to the mosque on the east side.
In 2011 reconstruction of the fortress began, the first phase of which was completed in August 2012.