Thousands celebrated at the annual Pride Parade while two major institutions were absent.

The Vancouver Pride Society banned the University of British Columbia and the Vancouver Public Library from participating in this year's event after both groups hosted speakers who oppose transgender rights.

"As an organization, we do have the right to say who can march with us and who can't. When there's transphobic or homophobic behaviour, obviously we're not going to let those people into our parade," explained executive director Andrea Arnot.

While the institutions were barred from entering the parade, staff and students were allowed to sign up to participate.

Last month, the society first uninvited UBC after an anti-SOGI speaker was allowed to speak on campus.

Jenn Smith, who's known for referring to transgender woman as men, had several planned events cancelled across the Lower Mainland, including at Douglas College in New Westminster and Trinity Western University in Langley; however, her event at UBC went through, despite attempts by different groups and thousands of UBC staff to have it cancelled.

A couple of weeks later, organizers banned the library.

In January, the library's downtown branch allowed a radical feminist blogger, Meghan Murphy, to speak.

At Murphy's event, five speakers asserted that transgender women were not women and should not be treated as women, according to parade organizers.

At the parade, Prime Minister Justin Trudeau weighed in on the society's decision.

"The pride community has the right to invite and include organizations that it feels are allies. I know that the goal of including everyone is really important, but it's also really important to take a strong stance against intolerance," he said.

The society said both institutions would be allowed to march again in the future if they change their room-booking policies.

With files from CTV Vancouver's Ben Miljure