Protesters blocking one of Canada's busiest border crossings were dealt a one-two punch Friday, as a court granted an injunction banning their blockade and Ontario's premier declared a state of emergency that would subject them to major fines.

Flag-waving demonstrators opposed to COVID-19 measures have been blocking cross-border traffic at the foot of the Ambassador Bridge in Windsor, Ont., for days. In a ruling late Friday afternoon, a judge gave them until 7 p.m. to clear out, although crowds were continuing to grow after that time and it remained unclear when many would leave.

“The activities that are the subject of this injunction, the freedom that those want directly results in the denial of freedom to others in society. The direct denial of their freedom to work. The direct denial of their freedom to cross and to move goods and services across the bridge,” Ontario Superior Court Chief Justice Geoffrey Morawetz said before delivering his ruling.

Upon hearing of the ruling, numerous protesters at the foot of the bridge - most of whom declined to give their full names - said they did not plan to go anywhere. A little later, a group of demonstrators voted to stay at the site, letting out a loud cheer and yells of “freedom” as man holding a microphone declared “let's stay.”

Music then blared from loudspeakers as a growing crowd of protesters milled about an intersection. Nearby, the number of uniformed officers and cruisers grew as well.

Windsor police issued a warning they'd soon take action.

“We are providing notice that anyone blocking streets or assisting others in the blocking of streets may be committing a criminal offence,” the force wrote in a statement.

Windsor's mayor said he remained hopeful for a “peaceful and negotiated resolution.”

“Local, regional and national law enforcement will collaborate and co-ordinate how best to respond to this legal ruling and seek to re-open the Ambassador Bridge,” Drew Dilkens wrote in a statement.

The injunction, which lasts 10 days, was sought by the Automotive Parts Manufacturers' Association. Its lawyer, Michael Wills, had argued the protest was costing the sector tens of millions of dollars each day as it had forced plants to reduce production.

He said that while granting an order that tells police they have the power to arrest people for breaking the law may seem unnecessary, it would ultimately serve a purpose.

“Members of the public need not take the word of the police that the arrest and detention of violators is authorized, because it is clearly set out in the order signed by the judge,” he said.

A lawyer for the City of Windsor, which was granted intervener status, said the protest was affecting more than just the economy.

“The protest has disrupted the city's ability to deliver critical services and is upending the lives of its residents,” she said.

Meanwhile, a lawyer for an unnamed group of protesters argued that they were not blocking all lanes of the road at the bridge, so an order was not necessary. But the deputy chief of police said one lane was open as a result of negotiations with the protesters only to allow emergency vehicles access.

Earlier Friday, Premier Doug Ford declared a state of emergency in response to the blockade in Windsor, and another that's immobilized Ottawa's downtown core for nearly two weeks.

Ford said he will enact orders making it “crystal clear” that it is illegal and punishable to block and impede the movement of goods, people and services along critical infrastructure, including international border crossings, 400-series highways, airports, ports, bridges and railways.

Fines for non-compliance will be up to $100,000 and up to a year imprisonment.

Ontario will also provide “additional authority to consider” stripping the personal and commercial vehicle licences from people not complying with the orders, but details weren't immediately available.

Ford said the past two years haven't been easy and frustrations have reached a boiling point for many, but the blockades must end.

“To those who have attempted to disrupt our way of life by targeting our lifeline for food, fuel and goods across our borders, to those trying to force a political agenda through disruption, intimidation and chaos, my message to you is this - your right to make a political statement does not outweigh the right of hundreds of thousands of workers to earn their living,” Ford said.

“It does not outweigh our right to get food across our borders. Your right to make a political statement does not outweigh the rights of one million people in Ottawa to live peacefully, free of harassment and chaos in their own homes.”

Prime Minister Justin Trudeau agreed.

“The border cannot, and will not, remain closed. Every option is on the table. So, if you're participating in these illegal blockades that are taking our neighbourhoods and our economy hostage, it's time to go home,” he tweeted.

In Windsor on Friday night, Paul James Acorn said he didn't think the police would try to remove the protesters by force.

“If they do, it's going to be an international fiasco. We're the peacekeepers of the planet,” he said.

Earlier in the day, some protesters said they believed the hardship brought on by the Windsor demonstration was worth it.

Mary Fehr said she knows someone who's been unable to work because the blockade has prevented automotive parts from reaching Canada, but she still felt the demonstration had merit.

“This is a small price to pay if it is going to boost us into the freedom that we all look for,” she said.

Jessica Faught, who brought her school-aged son to the bridge, said protesters were “fighting for their basic human rights.”

“Desperate times call for desperate measures and we have stood on the sidelines protesting downtown by the flag, countless protests, countless Facebook links shared with people ... so what more can we do?” she said. “We have to get the government's attention that enough is enough.”

The demonstrations have affected three of Toyota Motor Manufacturing Canada's production lines, pushed Ford Canada to reduce capacity at its Oakville, Ont., and Windsor plants and curbed manufacturing capacity at Chrysler and Dodge-maker Stellantis and Honda Canada.

- with files from Allison Jones in Toronto.

This report by The Canadian Press was first published Feb. 11, 2022.