LONDON — A Muslim woman can have a British court dissolve her religious marriage and divide the couple’s assets even though the union is not recognized under British law, a judge has ruled, a rare finding with potential implications for the rights of thousands of women.

In Britain, most Muslim couples who are wed in religious ceremonies do not register their marriages with civil authorities, surveys have found. That step is necessary to make a marriage legally valid. Their marriages have existed only under Shariah, the legal code of Islam based on the Quran, and could be ended only under Shariah, because British courts did not acknowledge the existence of the unions. The circumstance often put women at a significant disadvantage.

But British law recognizes a gray area: a marriage that is not legally valid, but is real enough that a judge can acknowledge it — and declare it void. Crucially, when a court voids an invalid union, just as in a divorce, the judge can also decide matters like support payments and division of property.

On Wednesday, Justice David B. Williams of the High Court of Justice in London ruled that the marriage of a Sunni Muslim couple, which was never registered with the government, fell into that middle ground. The wife, a lawyer, had asked the courts to take on the case, while her husband, a businessman, had insisted that legally, there was no case because there was no marriage.