A Hong Konger who played a harmonica to a crowd outside the British consulate during Elizabeth II's funeral was arrested for sedition, police and local media said Tuesday.

Crowds of Hong Kongers have queued to pay tribute to Britain's late monarch this week, some expressing nostalgia for the city's colonial past at a time when Beijing is seeking to purge dissent.

Hundreds gathered outside the consulate on Monday evening as Britain was holding a state funeral, sharing livestreams on phones as well as laying candles and flowers.

At one point, a man started to play songs on a harmonica, according to an AFP reporter on the scene, including the British national anthem and "Glory To Hong Kong", a popular song during huge, sometimes violent pro-democracy protests three years ago.

The mourners outside the consulate applauded the performance and shone their phone lights, with many later shouting the protest chant "Hong Kongers add oil" and singing "Glory To Hong Kong".

Local reporters later photographed the harmonica player being questioned by police and detained.

On Tuesday, police said a 43-year-old man surnamed Pang was arrested outside the consulate for "seditious acts".

A police source confirmed to AFP that the man arrested was the harmonica player.

After 2019's democracy protests, China has cracked down on dissent in Hong Kong using national security legislation and charges of sedition.

The latter is a colonial-era law that had fallen into obscurity for decades until prosecutors dusted it off in the aftermath of the protests.

The song "Glory to Hong Kong" contains the popular protest chant "liberate Hong Kong, revolution of our times" which has been declared by the courts to be a threat to national security.

A man in his 60s was charged earlier this year for performing without a license after playing the song on his er-hu, a Chinese two-stringed instrument, at a bus terminus.

Oliver Ma, a Filipino-Hong Kong busker, was arrested three times in 2020 and 2021 when singing the English version of the protest song on Hong Kong streets.

Hong Kong was a British colony for over 150 years and while the financial hub was returned to China in 1997, the past is engraved into its landscape, from street names and the ubiquity of English to the common law legal system.

In the week since Elizabeth II's death more than 13,000 people signed a condolence book in the city's British consulate.