Xi made the comment in a speech delivered towards the end of a two-day visit to Macau to mark the 15th anniversary of the territory's handover to China from Portugal.

Security was tight amid fears activists could attempt to stage protests during Xi's Macau visit.

Pro-democracy campaigners in both semi-autonomous territories are demanding free and fair leadership elections.

Protest sites in Hong Kong were recently cleared by police in a crackdown on activists who were demanding that Beijing step back from vetting candidates for the 2017 leadership election.

Symbol of pro-democracy movement banned

Reporters waiting for the Chinese president's arrival on Friday were banned from holding umbrellas, which had become the symbol of Hong Kong's pro-democracy movement.

They were given raincoats instead to protect them from the elements as they gathered on the airport tarmac.

Xi's message was clear as he warned both territories on Saturday against a "misguided approach."

Chinese President Xi Jinping meets Chui Sai On, chief executive of the Macau Special Administrative Region

"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, Chui Sai On. He was selected for a second term by a pro-Beijing committee in August.

"At no time should we focus only on one side to the neglect of the other. This is the only way leading to sound and steady progress. Otherwise a misguided approach from the beginning, just like putting one's left foot into the right shoe, would lead us nowhere," he continued.

Both Macau and Hong Kong enjoy certain freedoms unseen on China's mainland, however, the main sticking point for activists is that their leaders are selected by a committee loyal to Beijing.

Xi pledged his "full trust" in Hong Kong leader Leung Chun-ying after they met in Macau on Friday.

Move away from gambling in Macau

The president encouraged Macau to diversify away from casinos, which are its main source of income.

Macau is the only part of China where casino gambling is legal, and has until recently, depended on revenues from major players from the mainland.

Beijing warned the southern territory to reconsider its dependence on gambling after its income saw a major drop due to a national anti-corruption drive.

During the last six months, Macau's casino industry had billions of US dollars wiped off its market value.

lw/pfd (AP, AFP, Reuters)