A landmark defeat for the UK government at the Supreme Court over employment tribunal fees means that £27m ($35m) will have to be refunded among thousands of people, it was announced on Tuesday 26 July. The UK's highest court ruled that the government was acting unlawfully and unconstitutionally when the fees were introduced in 2014 under the Conservatives and Liberal Democrats.

The charges, which meant disgruntled employees would have to pay up to £1,200 for discrimination and unfair dismissal allegations, were designed to prevent vexatious claims against companies. But trade unions argued that they were unfair and hit the worst-off the hardest.

Unison general secretary Dave Prentis, whose union took the case to the Supreme Court, said: "The government is not above the law. But when ministers introduced fees they were disregarding laws many centuries old, and showing little concern for employees seeking justice following illegal treatment at work.

"The government has been acting unlawfully, and has been proved wrong – not just on simple economics, but on constitutional law and basic fairness too.

He added: "These unfair fees have let law-breaking bosses off the hook these past four years, and left badly treated staff with no choice but to put up or shut up. We'll never know how many people missed out because they couldn't afford the expense of fees. But at last this tax on justice has been lifted."

Emma Burrows, head of the employment department at Trowers & Hamlins LLP, said the ruling will "impact significantly" on employers and the judicial system.

"The Employment Tribunals are already under strain following a reduction in judicial resources, with long claims being listed well into 2018 in some regions," she said. "As claims go back up, this will need to be addressed by the government. Employers will also need to reassess their approach to risk when facing potential disputes with employees.

"In the immediate future, the reimbursement of fees already paid by claimants and reimbursed by Respondents will be a significant administrative burden for the government. As yet, there is no process for parties to follow to claim these fees back."

Justice Minister Dominic Raab said: "In setting employment tribunal fees, the government has to consider access to justice, the costs of litigation, and how we fund the tribunals.

"The Supreme Court recognised the important role fees can play, but ruled that we have not struck the right balance in this case. We will take immediate steps to stop charging fees in employment tribunals and put in place arrangements to refund those who have paid. We will also further consider the detail of the judgement."