For 14 years, they were practically inseparable. Olive Watson, an heiress to the IBM fortune, and her partner, Patricia Spado, shared homes and bank accounts, attended family functions, and bought a dog together. Ms Watson even named Ms Spado as the sole beneficiary of her will, cementing those rights of inheritence in 1991 by legally adopting her at a time when no state in the US was yet willing to recognise civil unions.

But a year later the couple broke up, and now courts in Maine and Connecticut are trying to undo that adoption to prevent Ms Spado from collecting her share of a trust fund set up for the grandchildren of the man who built IBM.

Gay rights advocates say the case exposes the legal hoops same-sex couples are forced to go through in order to establish such legal rights as inheritance. In 1991, no state in the US was yet willing to recognise civil unions, and some couples saw adoption as a route to establishing legal rights.

To this date, gay marriage is legal only in Massachusetts; six other states and Washington DC recognise same-sex unions and offer some of the legal protections and responsibilities of marriage.

"It certainly illustrates the lengths that many gay and lesbian couples have to go to protect their relationships," said Carisa Cunningham of Gay and Lesbian Advocates and Defenders.

Ms Watson, the daughter of Thomas Watson Jr, who was at the helm of IBM for two decades, and Ms Spado met in California in 1978.

Ms Spado soon gave up her job, crossing the continent to live with Ms Watson in her homes in New York and Connecticut and at her summer retreat in Maine. In all the years they spent together, the couple spent only five nights apart.

By the time Ms Watson took the extraordinary step of adopting Ms Spado her estimated net worth was $10m, according to court documents.

But despite being the beneficiary of Ms Watson's will, Ms Spado grew concerned about her financial security after Ms Watson began taking flying lessons, court documents suggest. So the couple turned to a court in Maine, which then required only that the adoptive parent and child lived in the state.

A year later the women separated and Ms Watson paid Ms Spado a settlement of half a million dollars. But the adoption was never legally undone, and when Ms Watson's parents died, Ms Spado - as an adopted grandchild - asked for a share of the trust they had set up for their 18 grandchildren.

Lawyers for the trust challenged that claim in a probate court in Connecticut, where Ms Watson's parents died.

In Maine, the lawyers for the trust are fighting to negate the original adoption, arguing it was granted on fraudulent grounds. The matter is now before the Maine courts.

"We are trying to annul the adoption," said Stephen Hanscom, a lawyer for the Watson family trust. "We don't believe this court in Maine had jurisdiction to grant the adoption."