The New York State Court of Appeals has ruled that a caretaker of a child — even one who is not an adoptive guardian or relative — can ask for visitation rights or custody.

The court recently heard the case of a same-sex couple who started their relationship in 2006. The following year, the two became engaged, although same-sex marriage was not legal yet in New York.

Using artificial insemination, one party became pregnant in 2008. The other party had a close relationship with the child that was born, a son. The child had her last name and both parties raised the child together.

Two years later, the couple’s relationship ended. Three years after that, the biological mother tried to keep the other woman from seeing the child, who sued for visitation and custody.

An appeals court overturned that ruling, saying that the definition of a parent from 25 years ago is not workable today. The court also noted that since New York allows gay marriage as of 2011 and the U.S. Supreme Court ruling in 2015 grants same-sex couples the right to marry across the country, the “nonrecognition of same-sex couple is unsustainable.”

If you are in a same-sex relationship that involves a child, it is important to learn more about your legal options. A lawyer can help you determine which legal avenues will be in your best interests and the best interests of your child. If a divorce is involved, there will be even more factors to consider, and your attorney’s advice will be even more beneficial.

Source: The New York Times, “New York’s Highest Court Expands Definition of Parenthood,” Alan Feuer, Aug. 30, 2016