The Government failed in an attempt to resurrect its outlawed method of clamping down on "sham marriages" entered into by illegal immigrants.
Three appeal judges upheld a High Court decision a year ago that sweeping rules, designed to block "marriages of convenience" aimed at avoiding immigration controls, were in breach of human rights - the right to marry and the right not to be discriminated against.
The finding of discrimination, a central issue in the case, arose from the fact the regulations did not apply to Church of England marriages and operated to the unfair disadvantage of not only non-Anglican Christians but also members of other faiths, including Muslims and Hindus.
The Government suspended operation of the rules and pledged to put forward amendments to end the discrimination, but challenged the "right to marry" ruling.
On Wednesday, the Court of Appeal held that the restrictions - which applied across the board with no inquiry into whether a marriage was a sham or not - were a "disproportionate interference" with people's right to marry.
Lord Justice Buxton said the Home Secretary could only interfere with a couple's right to marry in cases that involved, or very likely involved, sham marriages entered into with the object of improving the immigration status of one of the parties.
"To be proportionate, a scheme to achieve that end must either properly investigate individual cases or at least show that it has come close to isolating cases that very likely fall into the target category.
"It must also show that the marriages targeted do indeed make substantial inroads into the enforcement of immigration control."
Last year's High Court judgment, won by test case couples including an illegal entrant to the UK from Algeria, led to the launch of claims for damages from many people who say they have been denied the right to marry.
Hundreds of other cases are potentially affected.
Bravo to the judges! Some people will always abuse the institution of marriage for their own ends, but it is better to let these people get away with their sham marriages than to punish genuine married couples because of the actions of others.