Doctors in Wales have been promised their tax bills will be covered by the NHS in an attempt to get them back doing overtime shifts.
Some senior doctors faced bills for doing extra work after changes to how much could be accrued in pensions tax-free.
It meant it could even cost some doctors money if they worked overtime.
Health Minister Vaughan Gething said he was "delighted" NHS staff would not be left out of pocket.
The move in Wales follows a similar decision taken by NHS England last month.
The changes tended to hit those earning more than £110,000, which is about one-third of senior doctors and GPs.
The Welsh NHS Confederation, which represents health boards, said the Welsh Government had taken action about the pension tax rules, which were "impacting upon staff who want to help their patients by working additional hours".
Mr Gething said: "They can now take on extra shifts without worrying about charges on their pension".
The tax will now be paid by the pension scheme, while health boards will pay back a corresponding amount on retirement, ensuring they are fully compensated.
The confederation said the new arrangements would have no net cost to health boards or trusts.