OTTAWA - Ottawa is granting formal diplomatic immunity to the extensive foreign entourages who will take part in the G20 summit in Toronto in June.

That means hundreds, if not thousands, of government aides and advisers, as well as their spouses, can enter Canada without having their bags checked.

They can't be arrested or detained and there are no restrictions on the papers and documents they bring with them.

Experts accompanying the delegations have also been granted many of the same benefits.

The immunity is good from now until July 4, and covers travel to preparatory G20 meetings in Calgary in May, says a government notice in the Canada Gazette posted on Wednesday.

Federal organizers don't yet know exactly how many people to expect for the June 26-27 summit in Toronto.

Delegations can range anywhere from 10 people to well over 100.

Granting such privileges to diplomats is standard procedure, but hasn't always worked out well.

In 2001, a Russian diplomat in Ottawa was accused of drunk driving, after his car crashed into two pedestrians, killing one and seriously injuring the other.

He refused a breath test on the grounds of diplomatic immunity. He was later fired and sent back to Russia, where he was sentenced.

Last June, Ottawa police charged an employee of the Saudi embassy after a car chase in which a police officer was injured and a police cruiser damaged. The employee left the country before the issue of diplomatic immunity could be resolved.

And in 2008, Poland recalled its consul-general in Vancouver over allegations he ran into a fire truck while driving impaired.