Marriage rates among the over-65s increased by almost half between 2009 and 2014, bucking a general decline in the popularity of wedlock, official statistics have shown.

There was a 47% increase in the opposite-sex marriage rate (the number of people marrying per 1,000 unmarried persons) among over-65s during the five-year period at the same time as the marriage rate among the general population fell, according to the Office for National Statistics. Same-sex marriage only became possible in the UK from 29 March 2014.

In absolute terms, 7,005 men aged over 65 married a woman in 2014, up from 4,704 in 2009. The number of women in the oldest age group marrying a man also increased, from 2,509 to 3,932.

Nicola Haines, from ONS, said: “The number of marriages of opposite-sex couples increased by 2.7% in 2014, but this followed a drop of 8.6% in 2013. Marriage rates for opposite-sex couples remain below the levels recorded between 2010 and 2012.

“A possible reason for the increase in marriage rates for the 65-and-over age group is due to increased life expectancy meaning that people are living longer. Consequently there is more opportunity for marriages to end in divorce and divorcees may then go on to remarry.”

The marriage rate rose faster for women over 65 marrying men, with a 56% increase recorded between 2009 and 2014, compared with a 41% increase for men marrying women.

None of the age groups below 35 for men or women marrying the opposite sex showed an increase in the marriage rate between 2009 and 2014. The most significant rise outside the over-65s occurred in women aged 55 to 59, among whom marriage rates increased by a quarter.

The biggest percentage decrease over the same period came in the under-20 age group, with the marriage rate for men down a third and that for women down 27%.

There were 247,372 marriages between opposite-sex couples in 2014, according to the figures published on Tuesday. The ONS suggested the small increase from the previous year might be partly explained by people who had postponed marriages to avoid getting wed during a year ending in the number 13, considered by some to be unlucky.

There were 4,850 marriages between same-sex couples in 2014, of which 44% (2,129) were between male couples and 56% (2,721) were between female couples. In 2013, there were 5,646 civil partnerships formed between same-sex couples, so the figures suggested gay couples who would previously have entered into civil partnerships were taking advantage of the change in law to get married.

The average age at the time of marrying continued to rise in 2014. It was 37 years for men marrying women and 34.6 years for women marrying men. It was slightly higher for same-sex couples, at 39.5 years for men and 36.9 years for women.

The percentage of religious ceremonies continued its long-term decline accounting for 28% of opposite sex marriages in 2014 and just 23 (0.5%) same-sex marriages.