The Queen's funeral cost the government an estimated £162m, the Treasury says

ITV News' Louise Scott reports from Edinburgh on the Queen's state funeral costs

The Queen's funeral cost the government £161.743 million, the Treasury has said.

In the weeks after her death on September 8, hundreds of thousands of people paid their respects to the late monarch at the Lying at Rest in Edinburgh, the Lying-in-State in Westminster, as well as in London and Windsor for the State Funeral on September 19.

It was a once-in-a-generation event, with a military procession and funeral at Westminster Abbey attended by senior political figures and famous faces from across the Commonwealth and beyond.

Members of the royal family, including the King, watch on during the military procession. Credit: PA

The Treasury released a statement breaking down the costs of the historic event on Wednesday.

Chief Secretary to the Treasury John Glen said: "The period of national mourning that followed was a moment of huge national significance.

"The Government’s priorities were that these events ran smoothly and with the appropriate level of dignity, while at all times ensuring the safety and security of the public."

The estimated costs were divided by department, with the Home Office spending the most at over £73.6 million.

A break down of the costs for each department

Department for Culture, Media & Sport - £57.420 million Department for Transport - £2.565 million Foreign, Commonwealth & Development Office - £2.096 million Home Office - £73.68 million Ministry of Defence - £2.890 million Northern Ireland Office - £2.134 million Scottish Government - £18.756 million Welsh Government - £2.202 million

Total: £161.743 million

"All figures are the marginal costs, meaning money spent specifically on the events, as opposed to costs that would have been incurred in any case," Mr Glen added.

Additional funding was provided by the Treasury to meet these costs, including fully refunding the Scottish Government, Welsh Government and Northern Ireland Office for their respective costs.

The funeral of Queen Elizabeth II drew one of the biggest British television audiences this century, with millions tuning in to watch the ceremony and her final journey to Windsor.

The average audience for the Queen's funeral service at Westminster Abbey was 26.2 million across all channels, according to provisional figures released by the research organisation Barb, Broadcasters'​ Audience Research Board.

Listen to our royal podcast, the Royal Rota