When Toronto police arrested Gary McCullough near the G20 security fence on June 24, 2010 they violated his rights, a judge has ruled.

Ontario provincial court Justice David Fairgrieve ruled that when police questioned McCullough about things they found in his car, he should have had a lawyer present.

McCullough, 54, is on trial for weapons offences connected to the incident.

McCullough's lawyer, James Carlisle, said the judge made the right call.

Police arrested McCullough, said Carlisle, "without giving him any opportunity to consult counsel, without any kind of caution, anything at all by way of warning. So the judge, applying law, said it's clear that these sorts of statements must be excluded."

Fairgrieve then ruled any statements McCullough made to police who questioned him at the scene about a crossbow, gas cans and other things found in his car, were no long admissible.

McCullough was arrested on The Esplanade in downtown Toronto, very close to where the leaders of the G20 were to meet two days later.

While the judge ruled McCullough's rights were violated, he still has to face the weapons charges.

He's back in court on Friday and his trial will likely to last until September.