A lesbian has won a bitter legal battle over access to the two children of her former lover who is the biological mother of the girls.

Lawyers involved said the decision was a breakthrough in the treatment by the courts of same-sex relationships.

Lord Justice Thorpe, a top Court of Appeal judge who specialises in family cases, reversed the ruling made at Telford County Court in November last year which denied a joint residence order to the first partner.

By allowing joint residence, the 46-year-old Shropshire woman now has shared parental responsibility for the girls, aged six and three.

This is the only method under present law that a same-sex partner who is not a biological parent can claim such responsibility.

Lord Justice Thorpe said "firm measures" needed to be taken to safeguard "a vital side" of the children's family life.

It was the first case of its kind to reach the Court of Appeal which imposed reporting restrictions barring identification of any of the parties involved.

The woman, who has a 16-year-old son, had lived with the 31-year-old mother of the girls, conceived by donor insemination, since 1995.

Their relationship broke up in May 2003 and the mother now has a new partner.

During the county court proceedings it was said that the mother had tried to " marginalise" her former lover and their attitude towards one another had become "hostile".

Although the county court granted sole residence to the mother, the judge did allow contact to the former partner so that she could have "a significant role in the lives of the children".

The mother then announced she would be moving to Cornwall with her new partner.

Lord Justice Thorpe said it was a feature of the appeal that parties in same-sex relationships can only achieve parental responsibility if they succeed in an application for a joint residency order.

He said there was now a trend in the law towards " relaxation of the boundaries" of the rights of same-sex partners but at the moment the route to gaining parental responsibility was only through joint residency.

Lord Justice Thorpe said a court welfare officer had reported to the county court that the appellant wanted "proper legal involvement in the girls' lives".

"She wanted to love, support and help them."

The mother believed her former partner should be seen as an extended family member, not a parent, and she did not accept that she could care for the children properly.

The court welfare officer said excluding the former lover would not help the children who needed to understand the history of their earlier lives.

"A shared residency order would help the girls to have a clear picture of where they fit in when they grow older," the court welfare officer reported.

She said the move to Cornwall was an attempt to frustrate the court's contact arrangement.

But the county court judge said joint residency would lead to endless disputes between the former partners which may require the court's intervention and was not in the best interests of the children.

Lord Justice Thorpe said the children would benefit from allowing shared parental responsibility between the former partners.

He said: "What has been said about the importance of fathers is of equal application in same-sex parents."

The appeal judge said there had been a "judicial recognition" of family diversity as the family had evolved in society.

"I am in no doubt at all that the children require firm measures to safeguard them from diminution or loss of a vital side of family life."