Chinese President Xi Jinping lavished praise on Macau Thursday for instilling patriotism and rejecting political strife, in stark contrast to his tough words for neighbouring Hong Kong as it convulses with unrest.

Xi made his remarks at a lavish banquet and gala in the former Portuguese colony as it puts on three days of festivities to mark the 20th anniversary of its handover to China.

Xi attended a gala dinner in Macau
Xi attended a gala dinner in Macau AFP / Anthony WALLACE

"Loving the motherland as well as Macau has become a core value across society," Xi said, before an evening of patriotic songs and dancing.

"They cherish a strong sense of national identity and patriotism and the belief that the love for the motherland and the love for Macau are nothing but the same," he added.

China's authoritarian leadership is keen to showcase Macau as a successful example of its "one country, two systems" model, with the pliant city of 700,000 growing rich on gambling and deference to authoritarian rule.

Macau hosted a colourful cultural performance on Thursday night
Macau hosted a colourful cultural performance on Thursday night AFP / Anthony WALLACE

Since the 1999 handover by Portugal, Macau has witnessed little of the dissent that has exploded in Hong Kong during six months of often violent pro-democracy protests as large chunks of the population seethes under Beijing's rule.

Like Hong Kong, Macau maintains its own currency, judiciary and free market, but it has long since passed mainland style anti-sedition laws that have been successfully resisted by Hong Kongers.

Macau is celebrating 20 years since its handover to China by Portugal
Macau is celebrating 20 years since its handover to China by Portugal AFP / Anthony WALLACE

"The government and people across society in Macau know fully well that if the family lives in harmony, all affairs will prosper and that amity brings good fortune," Xi said.

"They have chosen unity and consultation over contention and infighting, and rejected all sorts of disturbance from the outside," Xi added.

On Friday Macau will inaugurate its new chief executive Ho Iat-seng
On Friday Macau will inaugurate its new chief executive Ho Iat-seng AFP / Anthony WALLACE

Although Xi avoided all mention of Hong Kong in his speech, the message was clear.

China has repeatedly portrayed Hong Kong's huge protests as a foreign-backed colour revolution designed to destabilise the motherland, rejecting any suggestion the city's seven million inhabitants have legitimate political grievances.

Xi praised the passage of Macau's national security laws in his speech on Thursday evening and noted that the Chinese national anthem and flags were routinely used with pride in Macau.

In recent years in Hong Kong, fans often boo the national anthem at football matches while Chinese flags have become a frequent target for pro-democracy protesters, fuelling outrage in Beijing.

When Xi made a visit to Hong Kong in 2017 for the city's own handover celebrations, he delivered a tough speech warning that any challenge to the authority of the central government was a "red line and absolutely impermissible".

Among those attending the festivities Macau was Hong Kong's leader Carrie Lam, who currently boasts record-low approval ratings and has struggled to end six months of huge and often violent pro-democracy protests.

The pair met in Beijing on Monday with Xi announcing his "unwavering support" for Lam despite another huge pro-democracy rally earlier this month and her government's thrashing at recent local elections.

Hong Kong's government said the two met again in Macau on Thursday afternoon without detailing what was said.

On Friday -- the 20th anniversary of handover -- Xi will oversee the inauguration of Macau's new leader Ho Iat-seng, a former member of China's top lawmaking body, who won an uncontested race earlier in the summer.