Ontario passed a legislation on Wednesday to temporarily halt commercial evictions during the COVID-19 pandemic.

The legislation applies to small businesses that are eligible for the Canada Emergency Commercial Rent Assistance program (CECRA), which provides forgivable loans to commercial landlords for the months of April, May and June.

The government said the ban, which is retroactive to May 1 and lasts until Aug. 31, will protect business owners from being locked out or having their assets seized during the pandemic.

"This legislation will allow us to protect small businesses and help them get back on their feet so they can continue to create jobs and participate in the rebuilding of the provincial economy," said Steve Clark, Minister of Municipal Affairs and Housing.

Some landlords have said they weren't interested in covering part of their tenant's rent as part of the CECRA program, either because the application process was too difficult, or they didn't want - or couldn't afford to - swallow the 25 per cent loss that would come from a program that supported 75 per cent of the rent owed.

The NDP said the legislation only applies for businesses that qualify "for the deeply flawed, very narrow" CECRA and excludes thousands of businesses.

"After dragging his feet for months, Ford also refuses to extend these protections back to the beginning of the pandemic, which excludes even more businesses, and may just encourage bad actors to backdate eviction notices," NDP economic growth critic Catherine Fife said in a statement.

- with files from the Canadian Press