A man who provided sperm to a lesbian couple in response to an online ad is the father of a child born to one of the women and must pay child support, a Kansas judge ruled Wednesday.

Topeka resident William Marotta had argued that he had waived his parental rights and didn’t intend to be a father. Shawnee County District Court Judge Mary Mattivi rejected that claim, saying the parties didn’t involve a licensed physician in the artificial insemination process and thus Marotta didn’t qualify as a sperm donor, The Topeka Capital-Journal reported.

‘‘In this case, quite simply, the parties failed to perform to statutory requirement of the Kansas Parentage Act in not enlisting a licensed physician at some point in the artificial insemination process, and the parties’ self-designation of (Marotta) as a sperm donor is insufficient to relieve (Marotta) of parental right and responsibilities to the child,’’ Mattivi wrote.

The Kansas Department for Children and Families filed the case in October 2012 seeking to have Marotta declared the father of a child born to Jennifer Schreiner in 2009. The state was seeking to have Marotta declared the child’s father so he can be held responsible for about $6,000 in public assistance the state provided, as well as future child support.

Marotta opposed that action, saying he had contacted Schreiner and her partner at the time, Angela Bauer, in response to an ad they placed on Craigslist seeking a sperm donor. He said he signed a contract waiving his parental rights and responsibilities.

Attorneys for the state contended the contract was moot because the parties didn’t follow a 1994 Kansas law requiring a licensed physician to perform the artificial insemination when donors were involved.

During oral arguments at a hearing in October, Timothy Keck, co-lead counsel for the state, said the case focused on child support. Marotta’s attorney, Benoit Swinnen, cited several court rulings he said support the argument that Marotta is legally a sperm donor and not required to pay child support.

Swinnen also argued that the Kansas statute doesn’t specifically require the artificial insemination to be carried out by a physician.

Court documents show Schreiner indicated she didn’t know the name of the donor or ‘‘have any information’’ about him in her application for child support. However, a sperm donor contract between Marotta and the couple includes his name, and the agency noted the couple talked about their appreciation for him in an interview with The Capital-Journal.

A filing Wednesday by the DCF argues the sperm donor contract overlooks ‘‘the well-established law in this state that a person cannot contract away his or her obligations to support their child.’’

The right for support belongs to the child, not the parents, the filing says.

The agency said it also received different versions of the donor contract from Marotta and Schreiner, suggesting that the document ‘‘may be invalid on its face.’’

‘‘We stand by that contract,’’ Swinnen said. ‘‘The insinuation is offensive, and we are responding vigorously to that. We stand by our story. There was no personal relationship whatsoever between my client and the mother, or the partner of the mother, or the child. Anything the state insinuates is vilifying my client, and I will address it.’’