Thanks to the multitude of earthquakes and invasions, relatively little of Azerbaijan's truly ancient architecture remains The most notable medieval exceptions are Baku's unique Maiden's Tower and the Momine Khatun mausoleum tower in Nakhchivan (12th century)
Surviving buildings from the 12th to 19th centuries are predominantly religious, though several caravanserais (Baku, Shaki, Sangachal, Agdash), brick bath-houses, and many castie ruins (best at Chirax, Gadabay/ Rustam Aliev, Pengala/Muxax) remain. There are khans' palaces in Baku and Shaki.
From the latter half of the 19th century poor styles of local architecture started to change radically. The initial division of oil-prospecting land into very small, affordable plots meant that even the poorest peasant or worker had a lottery chance of digging out a 'gusher'.
Dozens of illiterate overnight millionaires spent the years between 1880 and WWI vying to out do one another with displays of new-found opulence and 'good taste' with typical nouveau-riche zeal. Teams of architects were brought to Baku from Europe and Russia, while local architects and the oil magnates themselves toured Europe looking for designs and motifs which caught their fancy.
The resulting 'oil-boom style' is thus an unabashed melange with an immediate appeal to anyone except po-faced architectural purists. Though neglected and subdivided during the Soviet era, the basic fabric of most of these mansions survives.
Impressario guide Fuad Akhundov succinctly sums up the three main phases of 20th-century design:
Although there's no new Stalin trying to daunt people with massive stone edifices as in the '40s and '50s, the independence-era tower blocks characterize a new oppressiveness - of rich over poor.
The oppressive phase was not only a political gesture but a real need to provide decent housing for some 10,000 families working in appalling conditions in the Absheron oilfields Thus 380 apartment blocks were rushed to completion between 1925 and 1929 Initially apartment design tried to incorporate a few traditional features of local architecture such as pointed arched entrances, windows on wooden frames in 5x7-pane shebeke patterns and, most practically, steps up to the doors to prevent dust collecting.
The remarkable post-WWII construction boom and the return to high-quality stone buildings with a surprising level of carved detail was possible in large part to the free labour of relatively-skilled German prisoners of war who, in a little-known postscript to WWII, were not allowed to return till 1949-50 or even 1951. They were also put to work on the construction of railways.