Government plans to rectify a pension discrimination issue highlighted by two landmark court cases are expected to cost taxpayers £17bn.

The Treasury published a consultation looking at how it will implement the McCloud and Sargeant judgments to remove discrimination between pension scheme members.

The issue concerns public sector pension scheme members who were enrolled into newer schemes while older scheme members’ defined benefit pension accruals were protected from a downgrade. The courts ruled by doing this the government was discriminating against younger members based on age.

Although the rulings concerned judges and firefighters, the consultation set out plans to allow eligible members of the NHS, teachers, firefighters, police, armed forces and civil service pension schemes to choose whether to receive benefits from the legacy or reformed schemes for the period between April 2015 and March 2022.

Changes to judges’ pensions and local government pension schemes will be consulted on separately due to changes in pension protections.

Under the legacy schemes, pensions were based on years of service and final salary, whereas under the new schemes it was based on years of service and career average salary.

The Treasury suggested this particular remedy after it recognised that some members would receive better benefits in one scheme or the other but was unable to come up with an overarching approach.

The Treasury is also looking at proposals for members who join the schemes after this period. It suggested all active members be placed in the reformed schemes from April 2022.

Around 3m individuals could be affected, with the proposed changes expected to cost the exchequer £17bn.

Ian Browne, retirement planning expert at Quilter, said that correcting the ‘mistake’ could “not have come at a worse time” for the government.

Mr Browne said: “We all know pensions are costly, but that bill just got much higher and puts yet more pressure on the chancellor to find some spare pennies, to be specific £17bn worth.

“Where that is going to come from is anyone’s guess, but it seems sensible that if the triple lock wasn’t on the chopping block before, it might be now. Let’s face it, if the government can’t control the costs of public sector pensions, then they will likely look at other areas of pension costs and seek to control them instead.”