By THE ASSOCIATED PRESS

A legal challenge to a Massachusetts ban on evictions during the coronavirus pandemic has been dealt a setback by a state judge.

Suffolk Superior Court Judge Paul Wilson denied a request by landlords to stop the eviction moratorium while their lawsuit against the state proceeds, saying it was unlikely they will ultimately prevail.

Another suit brought by the same landlords in federal court will get another hearing next week after a federal judge asked lawyers for the state and three landlords this week to consider a settlement.

The pause on evictions took effect in April and was extended by Gov. Charlie Baker through at least mid-October. Tenants are still obligated to pay rent.

The landlords allege the moratorium violates their constitutional rights, including their right to petition the judiciary.

Vetstein says one of his clients is owed more than $20,000 in back rent by her tenants.

The moratorium is supported by housing advocates and some public health experts.

Attorney General Maura Healey, whose office represents the state in both cases, welcomed Wilson’s ruling.

“At a time when our residents are struggling financially, they need to know that they won’t be kicked out of their homes,” she said in a statement.