Azerbaijan country profile
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.
Mr Aliyev secured his second term in 2008 in an election Western observers said fell short of democratic standards.
The following year, the law banning the president from serving more than two terms of office was scrapped after the change was approved in a referendum in March 2009 - paving the way for Mr Aliyev's third five-year term in 2013.
In 2016 voters in a referendum approved constitutional changes to extend 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 seen as a potential heir.
Under his rule, Azerbaijan has increased its international profile, including as host of the first ever Baku European Games in 2015. But human rights groups have accused his government of cracking down on the freedom of expression, arresting rights activists and journalists.
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.