Iran became an Islamic republic in 1979, when the monarchy was overthrown and clerics assumed political control under supreme leader Ayatollah Khomeini.
The Iranian revolution put an end to the rule of the Shah, who had alienated powerful religious, political and popular forces with a programme of modernization and Westernization coupled with heavy repression of dissent.
Persia, as Iran was known before 1935, was one of the greatest empires of the ancient world, and the country has long maintained a distinct cultural identity within the Islamic world by retaining its own language and adhering to the Shia interpretation of Islam.
In 2002, US President George W Bush declared Iran as part of an "axis of evil". While Mr Bush's successor, Barack Obama, has softened his tone, Washington continues to accuse Iran of trying to develop nuclear weapons.
Iran, which has built its first atomic power station - at Bushehr, in the south of the country - with Russian help, says its nuclear ambitions are peaceful. Mahmoud Ahmadinejad, who was president from 2005 to 2013, insisted that Iran had an "inalienable right" to produce nuclear fuel.
In 2010, the UN voted to impose a fourth round of sanctions on Iran over the issue. Two months later, Tehran announced that engineers had begun loading fuel into the Bushehr plant and described this as a milestone in the country's drive to produce nuclear energy.
At a glance
- Politics: Domestic politics have long been characterised by a seemingly unbridgeable gulf between conservatives and reformers
- Economy: Iran holds 9% of world oil reserves; a critical shortfall in jobs has hit the young, and international sanctions have badly affected the economy as a whole
- International: Iran's nuclear programme prompted the international community to impose increasingly tough sanctions in a bid to persuade Tehran to halt uranium enrichment. A deal to restrict uranium enrichment was struck in November 2013
Country profile compiled by BBC Monitoring
Lack of progress on the nuclear issue increased tension with the UN, US and European Union through 2011, and the European Union announced a ban on Iranian oil imports that came into force in July 2012. As the EU until then received 20% of Iran's oil exports, this was a significant step.
The country has an abundance of energy resources - substantial oil reserves and natural gas reserves second only to those of Russia.
Iran has been led by a highly conservative clerical elite since 1979, but appeared to be entering another era of political and social transformation with the victory of the liberals in parliamentary elections in 2000.
But the reformists, kept on the political defensive by powerful conservatives in the government and judiciary, failed to make good on their promises.
Former President Mohammad Khatami's support for greater social and political freedoms made him popular with the young - an important factor as around half of the population is under 25.
But his relatively liberal ideas put him at odds with the supreme leader, Ayatollah Khamenei, and with hardliners reluctant to lose sight of established Islamic traditions.
The elections of June 2005 dealt a blow to the reformists when Mahmoud Ahmadinejad, Tehran's ultra-conservative mayor, became president.
Mr Ahmadinejad's controversial re-election in June 2009 and the violent suppression of subsequent opposition protests further widened the rift between conservatives and reformists within Iran's political establishment.
Hopes for more fruitful engagement with the rest of the world rose with the election of self-proclaimed moderate Hassan Rouhani to the presidency in 2013, and a deal to restrict uranium enrichment in November saw the lifting of some sanctions. But the domestic divide remains deep.