A woman with mental health difficulties who questioned the fairness of a state benefit designed to help disabled people maintain independence has won a High Court battle with ministers.

The woman said regulations governing personal independence payments – a benefit designed to cover some of the extra costs run up by people who need help with everyday tasks or with getting around – were discriminatory.

She claimed that people who suffered from “overwhelming psychological distress” were treated less favourably than people with other conditions when their ability to make journeys was assessed.

Work and Pensions Secretary David Gauke disputed her claims.

But a judge on Thursday ruled in her favour.

Mr Justice Mostyn, who analysed issues at a High Court trial in London earlier this month, said the regulations were “blatantly discriminatory” against people with mental health impairments and could not be “objectively justified”.

He said the woman, who was referred to in court as RF and has been advised by legal charity the Public Law Project, could not be named in media reports.

Lawyers representing Mr Gauke indicated that they planned to mount an appeal.

“I accept entirely that when a formulaic system for assessing needs and thus entitlements is introduced there will be some hard, arguably unfair, results particularly for those cases near the frontiers of descriptors and thresholds,” said Mr Justice Mostyn in a written ruling on the case.

“I reject any suggestion that a fair balance has not been struck because of the architecture of the scheme.

“However, the legitimacy of a formulaic system does not save this particular measure from failing the fair balance test.”

The judge added: “In my judgment, the 2017 regulations introduced criteria … which were blatantly discriminatory against those with mental health impairments and which cannot be objectively justified.”The Equality and Human Rights Commission had backed the woman’s claim.

Barrister Caoilfhionn Gallagher QC, who led the commission’s legal team, had told the judge the regulations drew an “unprincipled distinction between different categories of disabled person”.