SALT LAKE CITY — Proposed state legislation that would require Utah judges to favor heterosexual couples over same-sex couples in adoptions and foster care placements is blatantly unconstitutional and will not hold up in court, gay rights advocates argue.

State Representative Kraig Powell, a Republican and the sponsor of the legislation, said on Friday that last year’s Supreme Court ruling legalizing same-sex marriage would not stop Utah from keeping a preference in state law that a child have a married mother and father.

Mr. 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.”