A housing fight that has dragged on for seven years reached the Minnesota Supreme Court Tuesday, where attorneys battled over a Red Wing ordinance that allows city inspectors to enter rental units without permission from tenants or landlords.

Red Wing's ordinance isn't that unusual in its writing or scope, but it's the first time such city ordinances have been so strongly challenged by an unusual alliance of tenants and landlords. Other Minnesota cities have ordinances on the books that also allow for "administrative warrants," a judge-approved order to enter premises without permission.

Attorneys challenging the ordinance said it violates basic privacy rights and the Minnesota Constitution.

"The government should not be able to go into somebody's home without having some reason to search it," said Dana Berliner, an attorney at the Institute of Justice in Arlington, Va. "The administrative searches here are suspicion-less searches."

Some cities mention the need for "probable cause" to grant such warrants. Red Wing's ordinance, adopted in 2005, doesn't include that phrase, but the plaintiffs don't think that makes a difference.

St. Paul and Minneapolis ordinances both include exceptions that permit the use of administrative warrants when tenants refuse to allow an inspector inside. Both also first require probable cause.

"We read St. Paul's to really be like Red Wing's," said Anthony Sanders, an attorney with the Institute for Justice Minnesota Chapter.

John Baker, a local attorney representing Red Wing, said the ordinance does not violate the state Constitution. Baker said that "identical" language in the U.S. Constitution has been interpreted by the U.S. Supreme Court in a way that protects tenants and landlords while granting government leeway to carry out inspections.

Baker said administrative warrants can only be granted if a lower court judge decides the request has merit, and that such ordinances are necessary because cities can't rely on a building's exterior or tenant complaints to expose problems like faulty wiring and plumbing.

"It's the kind of ordinance that is considered constitutional in every state in the country," he said.

Chao Xiong • 612-270-4708 Twitter: @ChaoStrib