Lying at the crossroads of the North and South American continents and the Atlantic and Pacific oceans, Panama is of immense strategic importance.
This has made Panama the frequent object of US attention. The United States supported its secession from Colombia in 1903, and secured a sovereign zone in which to build the Panama Canal - which remained under US control from 1914 until 1999.
The US invaded Panama in 1989 to depose a former ally, military ruler Manuel Noriega, over his repressive rule and use of the country as a centre for drug trafficking.
Panama has the largest rainforest in the Western Hemisphere outside the Amazon Basin and its jungle is home to an abundance of tropical plants, animals and birds - some of them to be found nowhere else in the world.
However, it is for a feat of engineering, the canal connecting the Atlantic and Pacific oceans, that Panama is famous. Every year more than 15,000 vessels make the eight-hour journey through the waterway, which makes a substantial contribution to the country's economy.
At a glance
- Politics: Democracy was restored in 1989 after more than two decades of military dictatorship. Corruption, the drugs trade and social inequality are major political challenges.
- Economy: The canal brings in a large chunk of Panama's GDP, with offshore finance, manufacturing and a growing tourism sector also fuelling strong growth. Bananas are the main cash crop.
- International: Strategically important Panama maintains close diplomatic and cultural ties with the US. It is a member of the Organisation of American States.
Country profiles compiled by BBC Monitoring
Panama is widening the canal, which is more than 90 years old and operating almost at full capacity, to allow it to handle more and larger vessels. Work on the scheme, which was approved in a referendum in 2006, began in September 2007.
Offshore finance, manufacturing and a shipping registry generate jobs and tax revenues. Panama's services-based economy also benefits from the Colon free trade zone, home to some 2,000 companies and the second largest in the world.
A free trade agreement with the US was negotiated in 2006 but its implementation was held up pending approval by the US Congress, which was not granted until 2011.
Bananas are the main cash crop, but the trade has been hit by disease and is vulnerable to tariff changes in the European export market.
Panama faces the challenge of shaking off its reputation as a major transit point for US-bound drugs and illegal immigrants, and as a haven for money-laundering.
It also needs to address social inequality. Elite families of European descent control most of Panama's wealth and power, while about 33% of the population lived below the poverty line.
The canal, the natural attractions of its pristine forests and coastlines, and a lively, modern capital are fuelling a growing tourism industry.