In Wisconsin, the law says you can’t refuse a tenant because he’s black. Except sometimes, you can.

A Milwaukee appeals court on Tuesday ruled in favor of a white man who kicked out his black tenant, finding that the state’s fair housing law does not apply to situations where individuals are sharing a dwelling. The black roommate in the case, Martin Jones, claimed in an appellate brief that he had been evicted because the wife of his white roommate, Michael Haller, took issue with his race. A lower court dismissed Jones’s claims with prejudice in 2015, but he appealed the ruling.

But his luck was no better at the appellate level.

“It is undisputed that the reason Haller made Jones vacate 2209 East Vollmer was based, at least partially, on the fact that Haller is African American,” the Wisconsin 1st District Court of Appeals wrote.

But the men’s rental agreement doesn’t show that either man saw the residence as a two-unit dwelling, and their relationship was more similar to that of roommates living in one unit.

“When Haller informed Jones that he would have to move out, therefore, it constituted a decision by Haller as to the person with whom he wished to share his home,” the court wrote. “Such an act is not subject to the Wisconsin Open Housing Law.”

Jones moved in with Haller, who was recently separated from his wife, in February 2013, according to Jones’s court filings. He signed a $400-a-month rental contract for one of Haller’s three bedrooms in a Milwaukee house. Haller remained in the house with him, and the two occasionally watched TV together and talked about personal things. Though Haller was separated from his wife, Alicja, she also occasionally dropped by to do her laundry in the house she co-owned with her husband.

Then one day, Haller and his wife got in a fight that ended with Haller telling Jones he had to move out because Alicja had "issues" with a black man living in their house, according to Jones’s brief for the court.

"The [Haller] also told [Jones] that he felt bad about asking the [Jones] plaintiff to move out but that he had to take his wife's wishes into account because her name was also on the title to the house," the brief said.

Jones moved out by the deadline, less than two months after moving in with Haller. But such a request violated Wisconsin state law, Jones claimed, because it discriminated against him based on race. Haller was more than a roommate, according to Jones: He was the homeowner and thus a proper landlord.

Haller told the court a different story.

Haller alleged that Jones was nothing more than a bad roommate who hogged the fridge and monopolized the shared television.

"Twice, [Haller] found feces that were very large and unflushed in the toilet which [he] had to plunge and flush down," he also alleged in his brief for the appeals court.

And Haller claimed that Jones tried to trick him into saying something incriminating after Haller told him he’d have to move out, all while audio-recording their conversation on his phone. While Jones claimed that Haller volunteered a race-based reason for eviction, Haller said Jones tried to trick him into saying it was because of Jones’s race. In addition, Jones allegedly took a collectible blanket of Haller's with him when he finally left.

In his brief, Haller also claims that his wife had no influence over his decision to evict Jones, and that they had even cohabited together for a time.

“It's true that my wife came over and we had an argument, like so many that we'd had during our marriage, but it was nothing to do with my having a Black roommate,” Haller wrote. “She was angry at me for being able to seemingly be getting along fine without her.”