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.
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.
Azerbaijan's impressive economic performance over the past two decades has not been matched by the development of free media. Mainstream media offer little scope for rigorous reporting of government activity or debate about policy.
State outlets, and many private ones, promote the ruling Aliyev family.
Reporters Without Borders ranks Azerbaijan 162 out of the 180 countries included in the 2015 World Press Freedom Index. It says Azerbaijan has given outspoken journalists and bloggers the same choice as human rights advocates: "shut up, flee abroad or be jailed on trumped-up charges".
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.