Oil-rich Azerbaijan has redefined itself over the past two decades from a struggling newly independent state to a major regional energy player.
Deals with international energy producers have allowed the country to use its energy revenues to create a government-run fund involved in international projects. It has also used its resources to rebuild its army, which is seen as a government priority as the country grapples with the breakaway territory of Nagorno-Karabakh.
Despite its wealth and increased influence in the wider region, poverty and corruption continue to overshadow the country's development.
A government crackdown on human rights advocates and journalists has raised concern that Azerbaijan's embryonic democracy is under threat.
Republic of Azerbaijan
Population 9.7 million
Area 86,600 sq km (33,400 sq miles)
Major languages Azeri, Russian
Major religion Islam
Life expectancy 69 years (men), 75 years (women) (UN)
Main exports Oil, oil products
President: Ilham Aliyev
Ilham Aliyev took over as president from his father Heydar in 2003, and secured his latest term in 2018 in an election which Western observers said fell short of democratic standards.
In 2016 a referendum extended the powers of the president - including a controversial proposal to lower of the age limit for presidential candidates. The opposition said the move was aimed at cementing the rule of President Aliyev's family, with his 19-year-old-son as a potential heir.
Under his rule, Azerbaijan has increased its international profile, including hosting the Eurovision Song Contest in 2012 and the Baku European Games in 2015.
It also scored a major military success in late 2020, when it recaptured territory in and around Nagorno-Karabakh.
Dissenting voices are practically absent from mainstream media and critical journalists risk arrest and imprisonment.
TV is the most popular medium. All Azerbaijan-based channels toe the government line.
Social media are used as platforms for free expression and activism. Facebook is the leading social network.
Some key dates in Azerbaijan's history:
1828 - Turkmanchay treaty between Russia, Persia divides Azerbaijan. Territory of present-day Azerbaijan becomes part of Russian empire while southern Azerbaijan is part of Persia. Twenty years later, the world's first oil well is drilled south of Baku.
1918 - Independent Azerbaijani Republic declared but the country becomes a Soviet Socialist Republic two years later after the Red Army invades.
1988 - Nagorno-Karabakh region seeks to become part of Armenia. Ethnic Azeris begin to leave Karabakh and Armenia and ethnic Armenians leave Azerbaijan. Ethnic strife between Armenia and Azerbaijan will boil over into a full blown war by 1992.
1991 - Azerbaijani parliament votes to restore independence.
1994 - Armenia, Azerbaijan and Nagorno-Karabakh sign a ceasefire accord. Ethnic Armenians remain in control of Karabakh and a swathe of Azerbaijani territory around it.
Azerbaijan signs what it calls the "contract of the century" with a consortium of international oil companies for the exploration and exploitation of three offshore oil fields.
2020 - Azerbaijan scores a major military success when it recaptures territory in and around Nagorno-Karabakh.