Police in Hong Kong stopped about 20 pro-democracy protesters from getting near a flag-raising ceremony marking the 21st anniversary of the city’s handover from Britain to China.

The protesters on Sunday carried a coffin symbolising a death of democracy and chanted slogans against one-party rule in China, demands for universal suffrage in Hong Kong and mainland China, and freedom for Liu Xia, the widow of Nobel peace prize winner Liu Xiaobo.

The ceremony, held beside Victoria harbour, continued uninterrupted, with the Beijing-backed Hong Kong chief executive, Carrie Lam, in attendance. At a reception later on Sunday, she expressed confidence in Hong Kong’s future without mentioning any politically sensitive topics.

Lam, who took over a year ago, asserted that the “one, country, two systems” framework under which the financial hub is governed remains intact under her watch.

“Without fear, we correctly deal with our relationship with the central government. And we promote a stronger understanding of the constitution, the Basic Law, and national security in all sectors,” Lam said at a Sunday morning cocktail reception.

Hong Kong became part of China in 1997 after more than a century of British rule. China guaranteed a 50-year transition period under which Hong Kong would retain considerable autonomy, and keep the rule of law and its own legal and financial system.

During last year’s 20th handover anniversary, the Chinese president, Xi Jinping, warned in a speech that any activities in Hong Kong seen as threatening China’s sovereignty and stability would be “absolutely impermissible”.

Activists expect tens of thousands of people to attend a larger protest march on Sunday afternoon.

• Associated Press and Reuters contributed to this report.