An illegal immigrant has been allowed to remain in the country as removing her would breach her right to a family life with another woman.
The Court of Appeal overturned an earlier ruling to deport Emine Krasniqi, 54, an Albanian from Serbia.
The appeal judges ruled deporting her would violate Article 8 of the Human Rights law which protects family life.
Ms Krasniqi, of Birmingham, is now waiting for a ruling on partner Albana Lamaj's refugee status.
The pair live in Smethwick with Ms Lamaj's child from a previous relationship.
Both women fled to the UK after suffering at the hands of Serbian troops. They met in the country and are now bringing up Ms Lamaj's child in a "stable and committed family".
Ms Krasniqi's original appeal to stay in the country was allowed by an immigration adjudicator on the grounds of Article 8.
But, an Asylum and Immigration Tribunal (AIT) allowed an appeal by the Home Secretary saying the adjudicator had made material errors of law and the case was not exceptional enough to override her lawful removal.
At Monday's Court of Appeal ruling Lord Justice Sedley said the AIT had no power to interfere with the adjudicator's finding and that to hold it was not exceptional was not fair.
He said the case was "beyond the run of family separation cases as to outweigh even the imperatives of immigration control".
His reasons included the fact both women suffered public rape by Serbian soldiers and the fact that Ms Krasniqi lost her own two children when she fled her country and her violent husband.
Ms Krasniqi was married at 15 to an older man who already had a family and was repeatedly violent to her. She had a daughter and son with him and had now lost contact with them.
She and her daughter were gang-raped by soldiers in May 2000 and she arrived in Britain in August that year.
Her asylum claim was rejected in 2004 by which time she had met Ms Lamaj, 24, from Kosovo, who had a child, and were bringing up the child as "theirs".
Ms Lamaj's claim for asylum failed on appeal in 2001 but her application for protection on human rights grounds is still to be decided.
The AIT had said Ms Lamaj could chose to go with Ms Krasniqi if she was removed.
Appeal judge Lady Justice Arden said the effect of the Court of Appeal ruling would be to "hold the ring" while Ms Lamaj's claim is determined.