Tenants in Massachusetts who struggle to find housing due to a prior eviction may now get the chance to have those records sealed.

The Legislature’s newly passed housing bond bill includes a provision that would allow tenants to petition a court to seal their eviction record in cases such as a no-fault eviction, a dismissed case, or a case the tenant won.

Currently, there is no eviction sealing in Massachusetts. Housing advocates say even one eviction can bar someone from finding housing for years because landlords consult those public records when picking a tenant.

“I think this is going to be a very big thing for renters. Right now it’s really hard to find a place to live, and eviction records have been a serious barrier to finding a place,” said Annette Dukes, a housing attorney with the Massachusetts Law Reform Institute.

Dukes said some tenants wind up locked out of the market and end up homeless.

“I think this will help many, many people access safe and decent, affordable housing at a time when it’s incredibly difficult to do that,” she said.

Prior eviction records weren’t a major housing barrier until the state’s searchable court database went live in 2013. Since the late 1980s, more than 1.1 million eviction cases have been filed in Massachusetts, according to data from MLRI as previously reported by GBH News. Appearing in the database can often be seen as disqualifying in the eyes of a landlord.

Doug Quattrochi, executive director of MassLandlords, said eviction records are a crucial screening tool for landlords. Without changes to that access, he said, landlords may ask renters to show a higher credit score or income to lock down a place to live.

“Landlords have to screen because we cannot afford to provide housing to people who will smoke in no-smoking buildings, be up all night making noise and disturbance for other renters, damage the property or not pay their fair share of rent,” Quattrochi said.

Greg Vasil, president and CEO of the Greater Boston Real Estate Board, flagged one issue with the election sealing provision: dismissals.

The provision would allow sealing if a case is dismissed. Vasil said the concern is that sometimes cases are dismissed not because a landlord won or a tenant won, but because the court moves it off the docket administratively.

Vasil said a renter could avoid paying rent, get evicted and move out before a court date, which would trigger a dismissal — then seal the record and do it all over again in a new apartment.

“We totally believe people should have a second chance, but situations like this shouldn’t happen, because this is what makes the rental process more expensive,” Vasil said, noting that with the removal of the word dismissal on the bill, he would wholeheartedly support it.

Gov. Maura Healey has yet to sign the bill, but has signaled support for it. Quattrochi is advocating for a line item veto on eviction sealing specifically, which Healey has the power to do.