About 400 retired firefighters in Wales are to receive thousands of pounds in compensation because their pensions were miscalculated.

Firefighters across the UK who retired between 2001 and 2006 received lower lump sums than they should have because of an error by the UK government.

The Treasury has given the Welsh government £5m to compensate those affected in Wales.

It follows a ruling by the Pensions Ombudsman in a test case in May.

Retired Strathclyde fireman William Milne received more than £30,000 after winning his claim against the UK Government Actuary's Department (GAD).

The Ombudsman ruled that firefighters and police officers who retired between December 2001 and November 2006 should receive a top-up to their lump sum, plus interest.

Image caption Former police officers will also receive compensation for the pension error

Thousands of police officers - including hundreds in Wales - are also affected.

As the fire service is devolved, the Welsh government is overseeing the compensation payments to retired Welsh firefighters.

The UK government is responsible for payments to retired police officers in England and Wales.

A Welsh government spokeswoman said: "The Treasury has provided the necessary funding so that we are not required to absorb the costs from our existing budgets.

"The Welsh government will provide grant payments totalling £5.24m to the three Welsh Fire and Rescue Authorities to cover payments owed to firefighters who retired between 2001 and 2006."