It is widely accepted that the Old City, including its Maiden Tower, date at least to the 12th century, with some researchers contending that construction dates as far back as the 7th century.
The question has not been completely settled.

During this medieval period of Baku, such monuments as the Synyg Gala Minaret (11th century), the fortress walls and towers (11th–12th centuries), the Maiden Tower, the Multani Caravanserai and Hajji Gayyib bathhouse (15th century), the Palace of the Shirvanshahs (15th–16th centuries), the Bukhara Caravanserai and Gasimbey bathhouse (16th century) were built.

In 1806, when Baku was occupied by the Russian Empire during the Russo-Persian War (1804–13), there were 500 households and 707 shops, and a population of 7,000 in the Old City (then the only neighbourhood of Baku) whom were almost all ethnic Tats.
Between 1807 and 1811, the city walls were repaired and the fortifications extended.
The city had two gates:  the Salyan Gates and the Shemakha Gates.
The city was protected by dozens of cannons set on the walls.
The port was re-opened for trade, and in 1809 a customs office was established.

It was during this period that Baku started to extend beyond the city walls, and new neighbourhoods emerged.
Thus the terms Inner City (Azerbaijani: İçəri Şəhər) and Outer City (Azerbaijani: Bayır Şəhər) came into use.
Referring to the early Russian rule, Bakuvian actor Huseyngulu Sarabski wrote in his memoirs:
Baku was divided into two sections: Ichari Shahar and Bayir Shahar.
The Inner City was the main part.
Those who lived in the Inner City were considered natives of Baku.
They were in close proximity to everything: the bazaar, craftsmen's workshops and mosques.
There was even a church there, as well as a military barracks built during the Russian occupation.
Residents who lived inside the walls considered themselves to be superior to those outside and often referred to them as the "barefooted people of the Outer City".

With the arrival of Russians the traditional architectural look of the Old City changed.
Many European buildings were constructed during the 19th century and early 20th century, using styles such as Baroque and Gothic.

In 1865, a part of the city walls overlooking the sea was demolished, and the stones were sold and used in the building of the Outer city.
The money obtained from this sale (44,000 rubles) went into the construction of the Baku Boulevard.
In 1867, the first fountains of Baku appeared in the Boulevard.

In this period two more gates were opened, one of them being famous Taghiyev Gate (1877).
The opening of new gates and passes continued well into the Soviet period.

The church mentioned by Huseyngulu Sarabski was the Armenian Church of the Holy Virgin, built under Persian rule between 1797 and 1799 in the shadow of the Maiden Tower, defunct since 1984 and demolished in 1992.
It is widely accepted that the Old City, including its Maiden Tower, date at least to the 12th century, with some researchers contending that construction dates as far back as the 7th century. The question has not been completely settled.
During this medieval period of Baku, such monuments as the Synyg Gala Minaret (11th century), the fortress walls and towers (11th–12th centuries), the Maiden Tower, the Multani Caravanserai and Hajji Gayyib bathhouse (15th century), the Palace of the Shirvanshahs (15th–16th centuries), the Bukhara Caravanserai and Gasimbey bathhouse (16th century) were built.
In 1806, when Baku was occupied by the Russian Empire during the Russo-Persian War (1804–13), there were 500 households and 707 shops, and a population of 7,000 in the Old City (then the only neighbourhood of Baku) whom were almost all ethnic Tats. Between 1807 and 1811, the city walls were repaired and the fortifications extended. The city had two gates:  the Salyan Gates and the Shemakha Gates. The city was protected by dozens of cannons set on the walls. The port was re-opened for trade, and in 1809 a customs office was established.
It was during this period that Baku started to extend beyond the city walls, and new neighbourhoods emerged. Thus the terms Inner City (Azerbaijani: İçəri Şəhər) and Outer City (Azerbaijani: Bayır Şəhər) came into use. Referring to the early Russian rule, Bakuvian actor Huseyngulu Sarabski wrote in his memoirs:
Baku was divided into two sections: Ichari Shahar and Bayir Shahar. The Inner City was the main part. Those who lived in the Inner City were considered natives of Baku. They were in close proximity to everything: the bazaar, craftsmen's workshops and mosques. There was even a church there, as well as a military barracks built during the Russian occupation. Residents who lived inside the walls considered themselves to be superior to those outside and often referred to them as the "barefooted people of the Outer City".
With the arrival of Russians the traditional architectural look of the Old City changed. Many European buildings were constructed during the 19th century and early 20th century, using styles such as Baroque and Gothic.
In 1865, a part of the city walls overlooking the sea was demolished, and the stones were sold and used in the building of the Outer city. The money obtained from this sale (44,000 rubles) went into the construction of the Baku Boulevard. In 1867, the first fountains of Baku appeared in the Boulevard.
In this period two more gates were opened, one of them being famous Taghiyev Gate (1877). The opening of new gates and passes continued well into the Soviet period.
The church mentioned by Huseyngulu Sarabski was the Armenian Church of the Holy Virgin, built under Persian rule between 1797 and 1799 in the shadow of the Maiden Tower, defunct since 1984 and demolished in 1992.
Old City (Baku)