The Supreme Court has ruled that the government broke the law by introducing fees for disabled people and others who take cases for discrimination or other illegal or unfair treatment to employment tribunals.

The court ruled unanimously yesterday (Wednesday) that the government’s introduction of fees of up to £1,200 to take a case against an employer to an employment tribunal, in July 2013, was unlawful under UK and European Union law because it “effectively prevents access to justice”.

The court also ruled that the introduction of the fees by the government discriminated against women.

The Ministry of Justice (MoJ) has confirmed that it will scrap the fees and provide “full refunds” to those who have paid tribunal fees since 2013, but implied in a statement that it could reintroduce fees at a different level.

It pointed to the statement by one of the Supreme Court justices that fees “can, in principle, reasonably be considered to be a justifiable way of making resources available for the justice system and so securing access to justice”.

When asked whether it had ruled out reintroducing fees, an MoJ spokeswoman refused to comment.

The case against the lord chancellor had been taken by the union Unison, which said the “landmark” court victory – following a four-year legal battle – meant that anyone treated illegally or unfairly at work would no longer have to pay to take their employer to court.

And it said the government would now have to refund more than £27 million to the thousands of people charged for taking claims to tribunals since they were introduced by lord chancellor Chris Grayling in July 2013.

The Supreme Court ruling was welcomed by two newly-elected disabled Labour MPs, Jared O’Mara and Marsha de Cordova.

O’Mara welcomed the ruling, but said it addressed only “one small part of the wider issue of the erosion of access to justice” presided over by the Conservative and Conservative-Liberal Democrat governments since 2010.

He said there was also a need to address the government’s cuts to legal aid for employment and discrimination cases “as a matter of urgency”.

He said the Unison case highlights the “lack of respect for UK law” of the prime minister, Theresa May, who was home secretary at the time employment tribunal fees were imposed.

And he said that May and Grayling – who is now transport secretary – should “now both apologise for being complicit in breaking the law and actively demonstrate their remorse by resigning from their current roles”.

He said: “To refuse to do so would be an insult to the British people and would further demonstrate the contempt in which they hold our legal system.”

De Cordova also welcomed the Supreme Court decision, saying on Twitter: “Tribunal fees are a huge obstacle to justice. This is a great victory for unions and for workers’ rights.”

David Buxton, chief executive of the London-based disabled people’s organisation Action on Disability, said: “This is very good news for disabled employees fighting what were often cases of discrimination.

“Disabled people are entitled to equal treatment at work and within the justice system.

“I welcome this news and look forward to a future of more enlightened employers making fair and reasonable adjustments for disabled employees both in accordance with the law but also because it makes sound economic sense.”

He added: “The TUC’s Disability and Employment Report (2015) states that disabled people are as productive as their colleagues, take less sick leave, stay longer in their jobs, have fewer work accidents and enhance the employer’s brand.

“How can you argue against such facts?

“Action on Disability is proud to work with a number of employers on exciting work programmes, internships, job coaching and in-work support of disabled people and wishes to see more funding for initiatives of this kind rather than the penalising of disabled people who only wanted to work and to be treated fairly.”

He said: “Access to justice is a basic right. All our hard-won rights depend upon our ability to enforce them.

“I am delighted by Unison’s success in challenging the imposition of fees for employment tribunals.”

David Isaac, EHRC’s chair, speaking before the government agreed to scrap the fees, said: “The right to justice must be based on the merit of your case, not your ability to pay.

“Thousands may have been denied of this right and priced out of getting justice.

“The judgment of the Supreme Court is a damning verdict on the current regime.

“It is a licence to discriminate for employers and must be scrapped. The law only works if people know that it is a fair and just system and the biggest and strongest will not always win.”

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 judgment.”

The Ministry of Justice pointed out that Lord Reed, as part of the judgement, said that fees “can, in principle, reasonably be considered to be a justifiable way of making resources available for the justice system and so securing access to justice”.

But Lord Reed said that the lord chancellor “cannot, however, lawfully impose whatever fees he chooses in order to achieve those purposes”.