Prime Minister Justin Trudeau is no stranger to Vancouver's Pride parade, having taken part in the annual celebration for the past several years.

But this year he set a milestone for the 38-year-old event by becoming the first sitting prime minister to participate in the march.

Trudeau and his family waved to cheering crowds as they led the procession along the sunny, rainbow-laden streets of the city's downtown on Sunday.

The prime minister paused along the route to shake hands and snap selfies with enthusiastic spectators.

"What an incredible pleasure it is to be back here in Vancouver," he said moments before the parade set off.

"We celebrate the great diversity that is such a strength of our country. We celebrate community. We celebrate family. And all these things together means we're going to have a great Pride."

He began the parade alongside his wife, Sophie Gregoire-Trudeau, and his three children, the youngest of whom appeared oblivious to the noisy revelry as he slept in a stroller pushed by the prime minister.

On July 3, Trudeau also became the first incumbent prime minister to take part in Toronto's Pride parade.

The revellers in Toronto, some decked out in rainbow gear and outlandish costumes, gave the prime minister a boisterous reception, posing for selfies with him and chanting his name as he passed by.

Trudeau, however, downplayed his appearance at Toronto's parade as no big deal, noting he'd been attending Pride parades for years.

Official numbers have yet to be released for the Vancouver parade, but organizers estimated the celebration would attract more than half a million spectators.

The event drew some controversy when the activist group Black Lives Matter called for the Vancouver police to withdraw from the parade, saying allowing officers to participate on a float was "insulting" to protesters who made Pride celebrations possible.

The call came just weeks after the Toronto chapter of the group temporarily stopped the country's largest Pride parade and issued a series of demands — including more funding and better representation for minority communities during Pride events, and a ban on police floats in future parades.

The Vancouver group said on Monday that the city's police department, which ultimately took part in the parade, did reach out to them to listen to their concerns.