The Kingdom of Denmark has, despite its relatively small size, punched above its weight internationally.
Vikings raiding from Denmark and the other Nordic nations changed the course of 9th- and 10th-century European history; in the Middle Ages, the Union of Kalmar united all of Scandinavia under Danish leadership.
In more recent times, Denmark has developed a highly-competitive service-based economy with high employment levels and a generous social security system.
The Social Democrats led coalition governments for most of the post-war period until the 1980s, consolidating the country's liberal reputation, although concerns at high taxation levels and tension over immigration have put the centre-right in office for several long periods since then.
Kingdom of Denmark
Population 5.6 million
Area 43,098 sq km (16,640 sq miles)
Major language Danish
Major religion Christianity
Life expectancy 77 years (men), 81 years (women)
Queen: Margrethe II
Queen Margrethe became monarch only because a change in the law in 1953 allowed a woman to ascend to the throne. She succeeded on the death of her father, King Frederick IX, in 1972.
The queen is a skilled artist, clothes designer and translator. She speaks English, French and German, in addition to her native Danish, and her work as an illustrator has been widely published. Prince Henrik died in 2018.
Prime Minister: Mette Frederiksen
Social Democrat leader Mette Frederiksen led her party back to power in the June 2019 general election, ending four years of centre-right rule.
She campaigned on a combination of traditional centre-left calls for stronger welfare policies, combined with a promise to be tough on immigration.
At 41, she is the country's youngest prime minister, and will head a minority government.
She took over the party leadership in 2015, when her predecessor and Denmark first woman prime minister, Helle Thorning-Schmidt, lost power.
Public Danmarks Radio (DR) runs national TV networks and national and regional radio.
TV2 is a government-owned commercial station. The main privately-owned TVs broadcast via digital terrestrial, satellite and cable.
Freedom of expression is provided for in law.
Around 97% of Danes are online. Facebook is the top social media destination.
Some key dates in Denmark's history:
10th century - Kingdom of Denmark unified and Christianity introduced.
1397 - Union of Kalmar unites Denmark, Sweden and Norway under a single monarch. Denmark is the dominant power.
1729 - Greenland becomes Danish province.
1814 - Denmark cedes Norway to Sweden.
1849 - Denmark becomes constitutional monarchy; two-chamber parliament established.
1914-18 - Denmark is neutral during World War I.
1930s - Welfare state established by governments dominated by social democrats.
1939 - Denmark signs 10-year non-aggression pact with Nazi Germany.
1940 - Nazi invasion meets virtually no initial resistance. Government accepts occupation in exchange for measure of control over domestic affairs.
1943 - A determined campaign by the Danish resistance prompts Germany to take over full control of Danish affairs. Thousands of Danish Jews manage to escape to Sweden.
1945 - Germany surrenders and occupation ends. Denmark recognises Iceland's independence.
1949 - Denmark joins Nato.
1952 - Denmark becomes founder member of Nordic Council.
1959 - Denmark joins European Free Trade Association.
1973 - Denmark joins the European Economic Community.
1979 - Greenland is granted home rule. Denmark retains control over Greenland's foreign affairs and defence.
2000 - Danes reject adoption of the euro as their national currency.