Ontario's ombudsman had scathing criticism for the provincial government Tuesday for quietly passing a G20 security regulation that enabled police to exercise "phenomenal powers" that "should never have been enacted."

"For the citizens of Toronto, the days up to and including the weekend of the G8/G20 will live in infamy as a time period where martial law set in the city of Toronto, leading to the most massive compromise of civil liberties in Canadian history, and we can never let that happen again," André Marin told reporters.

Marin was speaking at a news conference where he announced the release of a report titled Caught in the Act, which determined the Liberal government's decision to enact Regulation 233/10 was unreasonable.

The regulation was passed by the Ontario cabinet on June 2 without debate.

It designated parts of the area within the G20 security fence in Toronto a public work, bringing it under the purview of the Public Works Protection Act, which was enacted in 1939 to protect infrastructure works from wartime enemies.

Marin said only "three small parts" of the security perimeter weren't already considered public works. The intent of the regulation was to close those gaps, he said.

But police frequently asked those near and outside the security perimeter to identify themselves and state their purpose for being there.

Anyone who failed to provide identification or explain why they were near the security zone could be searched and arrested. Penalties included up to two months in jail and a $500 fine.

The temporary rule expired June 28, the day after the two-day meeting of world leaders in downtown Toronto concluded.

"Responsible protesters and civil rights groups who took the trouble to educate themselves about their rights prior to the G20 had no way of knowing they were literally walking into a trap," said Marin.

"They were literally caught in the act, an act of public entrapment."

'Zero' co-operation from police

Marin's report included four recommendations to the Ontario government, which were all accepted by the Ministry of Community Safety and Correctional Services.

But he sharply criticized Toronto police, saying he received "zero" co-operation from the force over the course of the investigation, which he said he found "astounding."

The report said the regulation gave police "extravagant" authority. And because it gave them such powers, the government should have done more to make sure police knew exactly what powers it gave them, the report said.

Ombudsman's recommendations to the government: Revise or replace Public Works Protection Act.

Review scope of powers given to police under the act.

Inform public better when police powers are expanded in certain situations.

Report back to ombudsman about progress made in implementing changes.

In particular, critics raised objections as to why police and the province did not clarify how exactly the regulation would affect people in and around the summit.

Initially, the public was led to believe by Toronto police Chief Bill Blair that the regulation gave officers the power to demand identification and detain anyone within five metres of the fence.

"But there was no five-metre rule, and even when this was corrected, police continued to arrest and search people well beyond the security zone," Marin said.

Blair admitted on June 29 that no such five-metre rule existed, saying he had just been "trying to keep the criminals out."

It was "grossly unreasonable and unfair" for the government not to publicize the regulation, Marin said in the report.

Blair was out of town Tuesday and didn't comment on the report, but his spokesman Mark Pugash did.

Pugash said Marin is wrong when he says the so-called five-metre rule was applied right across the city.

"He [Marin] is absolutely wrong," Pugash said. "He appears for that to be relying on anecdotes. I don't know whether those anecdotes were ever corroborated — he doesn't make it clear in his report — but to use anecdotes for the basis to make such a sweeping statement, I'm not sure where he feels that's justified. But to say that it was extended all across the city is wrong."

Ontario Minister of Community Safety and Correctional Services Jim Bradley has already responded in writing to Marin with a letter saying he agrees with the ombudsman that the government "could have and should have handled the enactment of the regulation better."

Marin said in July his office would look into why and how the controversial regulation was passed after receiving around 60 G20-related complaints. Several of those complaints concerned the regulation specifically.