Dozens of protesters marched through Macau's historic centre as Chinese President Xi Jinping wrapped up his two-day visit to mark the 15th anniversary of the handover from Portugal.

Xi warned Hong Kong and Macau on Saturday to remember they are part of "one China", as activists in both semi-autonomous territories call for free leadership elections.

"We must both adhere to the 'one China' principle and respect the difference of the two systems," Xi said at the inauguration of Macau's chief executive Fernando Chui, who was selected for a second term by a pro-Beijing committee in August.

He also warned against "external infiltration and interference" to safeguard the stability of Macau. Beijing has accused foreign forces of stirring up the Hong Kong protests.

In the light of Hong Kong's umbrella movement, I think Macau people should escalate our actions for democracy.

Jason Chao, protester

The protest march in Macau culminated in a public square where around 100 demonstrators remained in the early evening.

Residents of all ages had earlier walked in the middle of the road shouting: "We want universal suffrage" through megaphones, some wrapped in banners and others with slogans painted across their faces.

Protests in Macau come just days after police cleared the last remaining protest sites in neighbouring Hong Kong.

"I am uncertain about Macau's future, so we have to come out to make noise for ourselves," Mark Pang, a 15-year-old high school student told the AFP news agency as he held up an open yellow umbrella, the symbol of the Hong Kong protest movement.

"In the light of Hong Kong's umbrella movement, I think Macau people should escalate our actions for democracy," local protest leader Jason Chao told AFP.

Both Macau and Hong Kong enjoy freedoms unseen on the mainland, but their leaders are selected by a loyalist committee.

Though Macau's democracy movement is not on the scale of Hong Kong's, the territory saw its largest ever protest in May over proposed cash benefits for retired Macau officials, with 20,000 people taking part.

Macau is the only part of China where casino gambling is legal and has depended on high-rollers from the mainland.