If you’re a landlord in Oakland or an Oakland renter with a criminal record, be advised that the city passed a new law that makes it illegal to run criminal background checks on prospective tenants.

The new law also bars landlords from turning anyone prospective tenants from rental housing on account of past convictions.

The Oakland City Council unanimously passed the Fair Chance Housing Ordinance on Tuesday, a formal second vote after the same measure sailed through on the first reading at a previous meeting.

The text of the new law notes that when people get out of prison in California, “they are routinely screened out when they apply to rent.” Oftentimes this means the formerly incarcerated can’t even stay with family members sue to of prohibitions on former prisoners.

The three councilmembers who sponsored the new law say that if people with criminal records can’t find homes, they’re likely to end up homeless or return to prison.

The lawmakers also criticize criminal databases as unreliable, and they argue that racial biases in the courts and the prison system translate into housing discrimination under the current status quo.

However, the law does exempt some homes, including “owner-occupied properties with three or fewer units, owner-occupied single-family homes,” and “units where the occupying tenant seeks to replace an existing co-tenant, add an additional co-tenant, or sublet.”

One speaker at Tuesday’s meeting quoted Congressperson Barbara Lee, saying, “It’s past time we put an end to the open discrimination against people with criminal records.”

Councilmember Nikki Fortunato Bas said of the new rules, “Oakland will become the first city in California to level the playing field.”

Other California cities have similar but less aggressive regulations, and the legislation cites out-of-state examples like Seattle and Portland. In San Francisco, the no-background checks rule applies only to affordable housing.

“No one should be against this,” said Councilmember Dan Kalb before casting his vote.

The change in the law won’t take effect for another six months, after which Oakland landlord could face $1,000 fines if cited for housing discrimination. (Which isn’t a lot of money relative to market-rate rents in Oakland these days.)

Landlords in other cities should pay attention: John Jones III, director for the campaign in favor of the Fair Chance ordinance, says he plans to begin drives for similar protections in other cities. Measures are brewing in Berkeley and Emeryville.