SALT LAKE CITY (AP) — Legislation that would require Utah judges to favor heterosexual couples over same-sex couples in adoptions or foster care placements is blatantly unconstitutional and won’t hold up in court, according to gay rights advocates.

Rep. Kraig Powell, R-Heber City, said Friday that last year’s U.S. Supreme Court ruling legalizing gay marriage doesn’t stop Utah from keeping a preference in state law that a child have a married mother and father.

Powell said his bill would not apply to private adoptions and would only involve children in state custody.

In those cases, he said a judge would “follow what’s been traditional and proven in society, that there’s a father and a mother and that gender diversity will be a broadening experience for the child.”

Powell said a same-sex couple would be given preference in an adoption or foster placement if they had a relationship with the child, such as being family members or neighbors.

Powell said he’s still working with state child welfare officials to figure out exactly how his idea would play out. He didn’t know if it would put gay couples at the bottom of waiting lists for children who are wards of the state or if officials would have to show they first searched for a heterosexual couple before placing a child with a gay couple.

He said it won’t stop gay couples from having or adopting children. He said his bill also would tweak existing laws about surrogacy and artificial insemination to make it easier for gay couples to have children those ways.

Equality Utah Executive Director Troy Williams said Powell’s proposal is clearly unconstitutional.

“Gay parents have equal protection now under the law,” he said. “Any effort by Rep. Powell to roll back the rights and liberties of LGBT Utahns will be met with fierce resistance from our community.”

Williams cited the backlash from a case last fall, in which a small-town Utah judge ordered a foster child be removed from a lesbian couple and placed with a heterosexual couple.