A High Court judge has expressed his bafflement at a case involving the Islamic tradition of shaving off a woman's pubic hair that has cost the taxpayer £350,000 and has now been dropped.

The Muslim parents of a severely mentally disabled woman, named as ED in court, claimed their daughter's pubic hair had to be shaved off as part of their Islamic beliefs. But the local authority, who have looked after the girl since 2008, say that she doesn't have the mental capacity to consent to such a procedure.

In 2011 the couple applied to the family court for their daughter, now in her thirties, to be returned home and raised the "stark" issue of her pubic hair being removed. The local authority objected and a long-running legal battle ensued which cost the council £138,000, the parents £82,000 and the official solicitor, who appeared for ED, £130,000. All of this will be paid by the taxpayer.

But as the case came for its final hearing to the High Court, the couple suddenly dropped their application.

High Court judge Mr Justice Roderic Wood said: "I thus remain utterly baffled by the course this litigation has taken, and perplexed by this lack of clarity in their case. Obtaining a 10-day slot of a High Court Judge's time is not easy, for there are many competing cases of equal if not greater urgency than this one".

Referring to the cost to the taxpayer, the judge said: "This is an astonishing sum of money, particularly when one considers...that the ultimate resolution is that the parents have, ultimately with their own 'consent', agreed to orders which dismiss any hope of ED coming to live with them and a significant reduction in her contact with them".

A huge amount of evidence was prepared, including 740 pages of witness statements, 300 pages of expert evidence as well as other documents, the judge added.

Unchallenged evidence from a cultural expert observed that "whilst there was a duty to remove pubic hair — both for religious and cultural reasons — there is an exemption for those incapacitated such as ED".

Terry Sanderson, President of the National Secular Society, said: "It is highly undesirable for secular courts to get involved in theological disputes. In this case, of course, there was more at stake than whether this woman, who is incapable of making a decision for herself on such an arcane matter, should have her pubic hair shaved. But it is ridiculous that such an issue should ever have reached the High Court at such monumental expense to the taxpayer. We share the judge's bewilderment that it ever got this far, but are also angry that it even came to court in the first place. People in the situation of ED should not be subjected to religious rituals that they don't understand simply because other people want them to be".