TORONTO -- With just five days to go until the end of the Sochi Olympics, the rainbow flag is finally flying at the Ontario legislature.

The three elected parties all agreed on Feb. 10 to ask the Speaker for permission to fly the Pride flag, but it wasn't granted until Tuesday, when the legislative session resumed.

The rainbow flag is a long-standing symbol of lesbian, gay, bisexual and transgender rights and pride.

It's been raised at various city halls and municipal buildings in a sign of solidarity after Russia passed an anti-gay law, including Montreal, Ottawa, Vancouver and Edmonton.

"We're joining other municipalities and jurisdictions across Canada and outlining our support for tolerance and equality and expressing concern with some of the policies that we've seen in Russia," said government house leader John Milloy.

"I think it's the right cause in light of what's happening in the Sochi Olympics," said Progressive Conservative Leader Tim Hudak.

Toronto Mayor Rob Ford caused a stir two weeks ago when he voiced his opposition to flying a rainbow flag at city hall, saying the Olympics are "not about someone's sexual preference."

Kathleen Wynne -- Canada's first openly gay premier -- has said that the Olympics are an opportunity "to demonstrate our tolerance, diversity and respect human rights on an international stage."

Her office has said she does not support intolerance of any group regardless of their faith or identity, and she rejects the Russian government's discriminatory laws.

In Vancouver, the flag went up at the request of Mayor Gregor Robertson, and coincided with a decision to send an openly gay councillor to Sochi to lobby for the International Olympic Committee to make Pride Houses mandatory at future Games.

Montreal Mayor Denis Coderre had said flying the flag was in protest of Russia's anti-gay laws, having seen "several gestures of repression towards the LGBT community in Russia."