Image caption Scotland's birth rate has been declining, while the death rate fell more quickly

Scotland's population has hit a record high of 5.25 million people according to the latest official figures.

There were 5,254,800 people in Scotland in mid-2011 - 14,000 more than the previous peak recorded in 1974, said the Registrar General.

While the birth rate has been declining, the death rate fell more quickly.

Inward migration has also continued to fuel population growth, with most of those arriving aged between 16 and 34.

Registrar General George MacKenzie said Scotland's population had been growing for nine years, with complex reasons for the trend.

"The population in some areas of Scotland has decreased," he said.

"Although births still outnumber deaths, there were fewer births than in 2010.

"In 2011, the number of deaths in Scotland dropped to 53,661, the lowest annual total since registration began in 1855."

The Registrar General's report also said nearly a quarter of marriages registered in Scotland in 2011 were for couples where neither the bride nor groom lived in the country.

It also showed the percentage of babies born to unmarried couples rose steadily from the 1970s until 2008.

In 2010 it was slightly more than 50% for Scotland as a whole, the same level as in the previous two years.