The Minnesota Supreme Court on Wednesday upheld a Minneapolis ordinance that prohibits landlords from refusing to rent residential properties to someone solely because they receive public assistance.

A group of landlords had sued, saying that the ordinance, first passed in 2017, violated their due process rights and the equal protection clause of the state constitution. The court ruled Wednesday that it did not.

City officials who passed the ordinance said they hoped it would reduce discrimination by preventing landlords from ruling out any tenants with Section 8 vouchers.

Justice Paul Thissen, writing for the majority, noted that the ordinance contains exceptions for landlords who would face an "undue hardship" if they were required to participate in the programs.

"The City's decision to prohibit landlords from refusing to rent to housing choice voucher holders because the landlords do not want to comply with the program requirements is a rational way to reduce refusals to rent based on prejudice against voucher holders," Thissen wrote.