Some Occupy Toronto protesters braved the cold Monday night, remaining in St. James Park and defying eviction orders, after a judge dismissed an attempt to save the month-old encampment and ruled the city's request to clear the park was "constitutionally valid."

Ontario Superior Court Judge David Brown dismissed the application from Occupy Toronto members to block an eviction notice, supporting the city's attempt to evict protesters from the site and remove all of their tents and camping gear.

Toronto police and city bylaw enforcement officers visited the park earlier in the day, handing out eviction notices and warning protesters that they are not allowed to camp overnight.

CTV Toronto's John Musselman reports that the eviction notices were posted on the letterhead of St. James Cathedral, a nearby church that owns some of the occupied land.

The notice warned protesters that they were prohibited from camping on church property.

St. James Park, located a few blocks east of the city's financial centre on Bay Street, has been overrun by tents and other structures since Occupy Toronto protesters flooded the site during a rally on Oct. 15.

At a news conference on Monday afternoon, Rev. Douglas Stoute from St. James Cathedral said that the church is co-operating with the City.

"Occupy Toronto is not an extension of the Cathedral," he told reporters. "We are hospitable and we are sympathetic to what they are trying to say but it is not a part of our program."

Stout also said that he hopes the protesters will abide by the judge's ruling and avoid violence.

At 4:30 p.m., about 500 Ontario Federation of Labour members marched to the park to show support for the Occupiers.

The court ruling has left demonstrators at the park divided on how to proceed. While some were calling for supporters to resist the eviction order, many were packing their belongings and preparing to leave.

A library constructed at the heart of the Occupy Toronto movement has become a potential flashpoint with police as two men chained themselves to the structure as Toronto police and city bylaw officers urged protesters to leave.

Two men dressed in black coats and wearing black masked over their faces chained themselves to the yurt late Monday afternoon, a temporary building that had been used as a free library during the past four weeks.

Other demonstrators gathered at St. James Park told CP24 that the men, and four or five others hiding inside the tent, had not been part of the Occupy Toronto movement and arrived at the park shortly after a judge requested protesters leave.

Some protesters were vocal in their plans to remain in the park, telling CTV Toronto that they would use nonviolent methods to defend their camp.

"I am willing to be arrested. It is that important," said protester Andrew Johnston.

Another protester could be seen securing a tent with chains and padlocks.

During a brief press conference, Mayor Rob Ford said he expected Occupy Toronto protesters to leave St. James Park quietly, but did not rule out asking police to clear the downtown park.

"I am asking the protesters to leave peacefully and I'd like them to leave as soon as possible," Ford said when asked what role police could play in clearing the park.

City Manager Joe Pennachetti said the city was willing to assist in removing camping material from the site.

A court order was issued last week allowing protesters to continue camping in the park after bylaw officers distributed notices demanding tents and other structures be removed and protesters clear out overnight.

A lawyer for the protesters had argued in court that the city was infringing on the protesters' freedom of expression.

"The encampment is an exercise of conscience," Lawyer Susan Ursel told Justice David Brown on Friday. "(It's a) manifestation of what they're trying to create in the world."

The city claimed that the protesters were trespassing on city property and preventing others from using the park.

In his ruling, Brown suggests that the protesters proclaimed a message of participatory democracy but "did not practise what they were preaching when they decided to occupy the Park."

He said protesters did not ask those who live and work near the park what they would think about the site becoming a tent city.

"The Charter does not permit the Protesters to take over public space without asking, exclude the rest of the public from enjoying their traditional use of that space, and then contend that they are under no obligation to leave," Brown wrote.

"By taking that position and by occupying the Park the Protesters are breaking the law. Such civil disobedience attracts consequences."

Mayor Rob Ford and other city officials have said they hope the protesters will leave the camp peacefully, but many demonstrators have vowed to stay regardless of the court's decision.

Municipalities across Canada have begun cracking down on local protests, one month after the global demonstration over corporate greed and social injustice began in New York City.

Camps in London, Ont. and Saskatoon have already been cleared out, while Occupy protesters in Vancouver faced a court-imposed Monday deadline to leave the lawn of a downtown art gallery.

An Occupy demonstration in Halifax was forced to relocate from the city's main courtyard earlier this month to make room for a Remembrance Day ceremony.

Protests in Victoria, B.C. and Edmonton have been whittled down to a handful of participants over the course of the last month.

With files from The Canadian Press