Jan. 24, 2014 -- William Marotta answered an ad on Craigslist from two lesbians who were looking for a sperm donor to conceive a child and, out of altruism, he said, gave the Kansas women donations for free and waived all his parenting rights.

But the District Court of Shawnee County Kansas ruled Jan. 22 that Marotta must pay back the state $4,000 in public assistance that it provided for the now 4-year-old girl, along with child support.

Marotta, a 47-year-old machinist from Topeka, said he had a written contract with the two women, and should not have to pay. He is appealing the ruling, which legal experts say is a first.

“I was a donor and [they] were the parents,” he told Topeka station WIBW. “We had a contract, and I said I am not going to be part of it and don’t ever intend to be part of it. They don’t want me to be part of it.

“Two people wanted to have a baby and couldn’t do it by themselves, so I assisted – that’s about it. [The state] is undoing a family.”

The state, on behalf of the Kansas Department for Children and Families, filed a lawsuit May 24, 2013, that asked for summary judgment against Marotta because the couple had not complied with a state law that required sperm donation be done under the supervision of a doctor.

The lawsuit cites a provision of the Kansas Parentage Act, KSA 23-2208(f), which states: “The donor of semen provided to a licensed physician for use in artificial insemination of a woman other than the donor’s wife is treated in the law as if he were not the birth father of a child thereby conceived, unless agreed to in writing by the donor and the woman.”

Marotta’s lawyer, Ben Swinnen, said Kansas law needs to be updated to reflect same-sex families and their use of sperm donation. He said the ruling was “politically motivated” in a state that has a constitutional amendment outlawing same-sex marriage.

“I feel we have reason to appeal,” Swinnen told ABCNews.com. “The court dismissed 90 percent of the arguments we made without so much as a line about it. The court also ignored all the other jurisdictions that sided with this brief. Many cases around the nation have tackled this issue one way or another.”

The Kansas Department for Children and Families did not want to comment on the case but provided this prepared statement to ABCNews.com: “We appreciate the judge’s careful consideration and attention to the law. The Kansas Department for Children and Families has maintained that KSA 23-2208(f) makes clear that individuals must go through a licensed physician in order to avoid the financial responsibilities associated with parenthood. The court and law support this position.”

Swinnen said that the women did not want to use a doctor for sperm donation.

“For reasons personal to them, they wished to have a child together,” he said. “They looked up sperm banks and got the cold shoulder from a physician. They were being judged. … Nobody was aware of the statute.”

Joseph W. Booth, the lawyer for the two women, who are referred to as A.B. and J.L.S. in the lawsuit, was not available to immediately comment on case.

According to the judge’s ruling, the couple had been in a “committed relationship” and in March 2009 placed an ad for a private sperm donor. They met Marotta and gave him a sperm donor contract that had been “downloaded from the Internet.”

“It is uncontroverted that the respondent did not seek any legal advice at the time,” states the ruling. “On March 30, 2009, the parties executed the Sperm Donor Contract at the home of A.B. and J.L.S.. Then, on three consecutive nights in April 2009, the respondent provided his semen to the women at their home, each time delivering it in a specimen cup.”

The insemination was successful, and the child was born in December 2009, according to the ruling. Before the birth, the biological mother applied for state assistance but did not list her lesbian partner as “a member of the household.”

The couple continued to live together until 2010, and then separated, the ruling said. In 2011, the biological mother again applied for state help for “food, cash and medical assistance” and revealed that the father of the child was “a donor,” said the ruling.

State services were discontinued in 2012 because the biological mother did not supply information on the anonymous donor, according to the ruling. It was then that she provided the contract to the state, which ordered reimbursement of previous services totaling $6,000.

That amount has since been reduced to $4,000, according to Marotta’s lawyer.

Swinnen has argued that the 1973 law cited in the ruling was outdated and designed to protect heterosexual couples using sperm donation from later interference from the biological father.

His said the current statute is unclear and has “the opposite intention.”

“Put yourself in America then,” he said. “It was designed to provide one avenue where there was certainty. If a woman obtains sperm provided to a physician, she can stop any claim of paternity by a donor.”

Marotta has said that the state should adopt a version of the Uniform Parentage Act, a set of rules for establishing parentage, which is recognized widely in other states. It declares equal rights for children regardless of their parents' marital status.

Once parentage is established, the court may make orders for child support, health insurance, child custody, visitation, name change, reimbursement of pregnancy and birth expenses, and restraining orders.

“In my mind if all the people in the state of Kansas put it to a vote,” Marotta told WIBW, “I would be out of this mess off the bat.”