VIENNA (Reuters) - Swiss police detained 32 Tibetans and Swiss nationals protesting against a visit by Chinese President Xi Jinping on Sunday, a spokesman said.

Swiss authorities had limited the duration of the protest in the center of Bern to two hours before noon (1100 GMT) to avoid the kind of confrontation that marked the last visit by a Chinese president 18 years ago.

Several people near a security zone set up for the state visit failed to comply with police instructions, Bern cantonal police said in a statement.

“Thirty-two people were detained to secure safety,” a spokesman said.

At noon, police prevented a man from setting himself on fire, according to the statement. The man was taken care of by doctors.

Fourteen activists were detained near the Swiss parliament building in the afternoon as they continued to protest past the time restriction, waving posters saying “Free Tibet” and “Don’t Deal With Killers”, the association of Tibetan Youth in Europe said.

“The situation inside Tibet is getting worse day by day. Our people are being oppressed, our people are being imprisoned,” the association’s spokeswoman Migmar Dhakyel said.

Slideshow ( 3 images )

“We are really concerned (about) how our government, our own government treats us, doesn’t permit us to demonstrate.”

Between 700 and 800 Tibetans and Swiss had gathered in the city center and protested peacefully against the Tibet policies of China, Tenzin Nyingbu, President of the Tibetan Community in Switzerland & Liechtenstein, told Reuters.

Most of them left before noon as agreed with Bern municipal security, Nyingbu said.

The Chinese leader arrived in the Swiss capital for a gala dinner on Sunday afternoon. After holding talks with Swiss officials on Monday, he will attend the annual meeting of the World Economic Forum in Davos on Tuesday, a first for a Chinese president.

In 1999, demonstrators took to roofs overlooking the Swiss parliament with banners demanding “Free Tibet” during a visit by China’s then-president Jiang Zemin.

Police intervened when people tried to throw eggs at the Chinese delegation. Jiang questioned Swiss leaders’ control over their country and remarked that they risked “losing a good friend”.

China and Switzerland forged a free trade agreement in 2014 and Swiss companies count China among their most important markets.

(This story corrects name of spokeswoman of the association of Tibetan Youth in Europe to Migmar Dhakyel, not Mimpara Dhakyel, in paragraph 7)