Police temporarily shut the gates to the G20 security perimeter early Friday evening, as they attempted to head off the largest in a string of demonstrations to protest the international meeting.

Anti-poverty demonstrators had attempted to march south towards the security zone where the G20 summit will take place. But they were turned back when police with shields blockaded University Avenue.

Instead the protesters backtracked, marching east towards the park where the demonstration originated, trailed by police in full riot gear.

"I'm not a hell-raiser but I want my voice to be heard," one woman told CP24, adding that she decided to join the demonstration in response to the large number of police on the city's streets. "I thought I lived in a democracy and I don't think I do any more."

The protests led the Integrated Security Unit to close the security fence around the Metro Toronto Convention Centre, where the G20 summit will be held. A gate was later reopened at Yonge Street and Wellington Street, apparently to allow residents and business-owners inside the security zone to pass through.

As the march wound down, organizers said they would set up a collection of tents in Allan Gardens, camp there overnight, and join another large G20 protest to be held at Queen's Park on Saturday afternoon.

The demonstration attracted some 2,000 people at its peak, in spite of a heavy police presence and news that Ontario had quietly passed legislation that allows police to question and arrest anyone walking within five metres of the security fence in the city's financial district.

The crowd was the largest in a string of demonstrations in the lead-up to the G8 summit, which began Friday in Huntsville, Ont., and the G20 summit that starts Saturday in Toronto. But by 7 p.m., the number of protesters in the march has since dwindled to a few hundred people, CTV Toronto's Naomi Parness reported.

One image showed a group of people clad in black masks among the demonstrators. Reports had suggested that a radical group may split off from the main demonstration and move towards the security fence around the Convention Centre, but that never occurred.

Another image showed a sizeable group of helmeted police, standing six officers across, and stretching back down a shaded alley.

The demonstration was for the most part peaceful, aside from one incident in which a protester was reportedly arrested by police.

An immigrants' rights group called No One is Illegal also reportedly released red and black balloons into the air, in an apparent attempt to challenge restrictions on the city's airspace during the summits. (Authorities have banned kites and hot air balloons in the vicinity of the Convention Centre.)

Organizers used social media sites such as Twitter to post updates as the demonstration unfolded.

The Toronto Community Mobilization Network, a collection of protesters from different groups, said that police were searching people as they entered Allan Gardens park where the demonstration originated.

John Clarke, with the Ontario Coalition Against Poverty, called the large police presence "offensive."