By ED WHITE, Associated Press

DETROIT — A judge has thrown out a Michigan law that bars public schools and local governments from offering benefits to same-sex partners.

Detroit federal Judge David Lawson stopped the law with an injunction more than a year ago. In a final step, he declared it unconstitutional Wednesday.

Lawson says the law is based on "an irrational prejudice."

The 2011 law was signed by Gov. Rick Snyder. It prevents public schools and local governments from offering benefits to unmarried partners of employees, whether homosexual or heterosexual.

Supporters say it was aimed at saving money, not punishing gays and lesbians.

Critics say the law in practice hurts gays and lesbians almost exclusively.