A B.C. Supreme Court judge has granted an injunction order to the City of Vancouver allowing it to clear out the Occupy tent city by Monday afternoon.

Justice Anne MacKenzie granted the city's request Friday -- including an order for enforcement by police -- and said the protesters will have until 2 p.m. on Nov. 21 to remove their tents and other structures. The decision follows three days of arguments, during which city lawyers argued that the demonstrators were trespassing.

MacKenzie said she was persuaded by the city's arguments.

"I find the city has established a clear breach of its bylaws. . . I find the city would have irrevocable harm if they were refused," she said.

The order also includes a provision allowing police to arrest anyone impeding people trying to access art gallery property. The judge added that the protests can continue, but protesters cannot continue to live on the site.

The city issued a statement saying it welcomed the decision, and that it will provide help for protesters in removing their tents. Staff will also assist those with "housing needs."

Mayor Gregor Robertson told reporters that he's confident protesters will comply with the order and dismantle their camp peacefully.

Lawyers for the protesters had argued the encampment should be allowed to stay on the grounds the tents were integral to free speech and assembly, an argument MacKenzie said fell outside the scope of her hearing.

Occupiers marched through downtown Vancouver Friday evening in protest of the injunction. One man was detained by police after some demonstrators wrote slogan on a Suzanne Anton campaign poster.

Some of those in the movement remained positive that their message will outlast the encampment, which has been set up at the Vancouver Art Gallery since Oct. 15.

"You can't evict an idea whose time has come!" OccupyVancouver tweeted.

Occupier Jaeme Grosvenor told CTV News that he wasn't surprised by the decision, but said he still feels that the injunction violates protesters' rights to freedom of assembly and speech.

"Obviously, I'm disappointed that the powers that we are living under aren't really exercising democracy in any way," he said.

However, he added that he's still hopeful that the Occupiers will be able to find a legal way to stay at the art gallery. If not, the protesters have developed a number of contingency plans.

"One of them would be simply to move to some other location, one that would maybe be more acceptable to the city," he said.

Protester Sean O'Flynn-Magee said he was concerned about how the order would affect the homeless people who have been living in the encampment.

"More time would have been nice, especially given that the temperatures are going to drop very, very low tonight and the city has not done a very good job at opening up homeless shelters," he said.

The Vancouver court decision comes just hours after a judge in Victoria issued an injunction against that city's Occupy protest.

Most protesters had already cleared out of the campsite in the provincial capital's Centennial Square earlier this week in anticipation of the judge's ruling.

With files from The Canadian Press