The John Adams Courthouse in Boston, home to the Supreme Judicial Court of Massachusetts. Photo:

The John Adams Courthouse in Boston, home to the Supreme Judicial Court of Massachusetts. Photo:

BOSTON — The same state court that paved the way for same-sex marriage in the United States is now being asked to decide a complicated case about the parental rights of a once-partnered but unmarried gay couple.

The Supreme Judicial Court of Massachusetts, the state that more than a decade ago became the first to allow same-sex marriage, will hear arguments Tuesday. The case seeks to determine whether Karen Partanen, whose former partner, Julie Gallagher, gave birth to two children through artificial insemination, should have the same parental rights as Gallagher.

Partanen helped raise the children, now 7 and 4. She and Gallagher split in 2013.

Gallagher acknowledges Partanen has been a good parent, and the kids spend half their time with Partanen under a shared custody order.

But Gallagher is challenging Partanen’s bid to be declared a full legal parent, which would allow Partanen to share in virtually every decision made about the children, including where they go to school, what doctors they see and what religion they practice.

“I am a biological mother. I wanted to have children. They’re my world, and it’s my right to make legal decisions for them,” Gallagher said in a recent interview.

“At no time have I — nor would I — attempt to remove the children from her life,” she said.

Partanen says she should have the same rights as Gallagher because they decided to have children together and raised them as a two-parent family.

“I love my children and have been their Mommy since they were born,” Partanen said in a statement.

“Julie and I have gone our separate ways, but that shouldn’t make any difference in the love, stability and legal protections our children have, and it shouldn’t take me away as their parent. Our family has changed, but our children should forever be able to count on their two parents.”

A judge dismissed a complaint Partanen filed in family court, finding she did not meet the requirements for legal parentage because she and Gallagher were not married when the children were born, and Partanen is not a biological parent.

Partanen appealed, and the state’s highest court agreed to hear the case.

The extent of Partanen’s parental rights is being disputed under two Massachusetts laws.

One law says that any child born to a “married woman” as a result of artificial insemination with the consent of “her husband” is considered the legitimate child of the mother and husband.

The other law says children born out of wedlock are entitled to the same rights and protections as children born to married couples.