United States President Barack Obama has angered China after warmly acknowledging the Dalai Lama at a national prayer breakfast in Washington.

Obama did not meet directly with the Dalai Lama at the event on Thursday, but China said on Friday that it was opposed to any foreign countries receiving him as a guest.

At the breakfast, Obama said the Buddhist religious leader was "a powerful example of what it means to practice compassion, who inspires us to speak up for the freedom and dignity of all human beings".

"I've been pleased to welcome him to the White House on many occasions, and we're grateful that he's able to join us here," he added, before launching into a speech highlighting the importance of religious freedom.

Chinese foreign ministry spokesman Hong Lei told reporters on Friday that Beijing is "against foreign countries interfering in China's domestic affairs under the pretext of Tibet-related issues".

"The Dalai Lama is seeking support from foreign counties to realise his political end, but he cannot succeed," Hong added, calling the spiritual leader "a political exile who has long been engaged in anti-China separatist activities under the pretext of religion".

It was the first time the Obama and the Dalai Lama have been seen together in public. Three previous encounters have been held behind closed doors - and outside the Oval Office - to avoid risking relations with China.

Last February, Obama held low-key talks in Washington with the Nobel Peace laureate, whom China considers a "wolf in sheep's clothing". The talks greatly angered Beijing, which had warned they would damage ties.

Source: Al Jazeera and agencies