By J.R. Wu

TAIPEI (Reuters) - On the anniversary of China's bloody crackdown on student-led protests in and around Beijing's Tiananmen Square, Taiwan's new president told China on Saturday that democracy is nothing to fear.

Tsai Ing-wen said in a Facebook post on the 27th anniversary that Taiwan could serve as an example to China.

Tsai said in the run-up to Taiwan's elections earlier this year that she had seen people from China, as well as the Chinese territories of Hong Kong and Macau, mixing with crowds in Taiwan.

"These many friends, after experiencing things for themselves can see that in fact there's nothing scary about democracy. Democracy is a good and fine thing," wrote Tsai, who took office last month.

China sent in tanks to break up the demonstrations on June 4, 1989. Beijing has never released a death toll but estimates from human rights groups and witnesses range from several hundred to several thousand.

The subject remains all but taboo in China, where President Xi Jinping is overseeing a broad crackdown on rights groups and activists.

Tsai also said in her Facebook post about the Tiananmen crackdown's anniversary that nobody could deny the material advances China had made under the Communist Party.

However, China would win even more respect internationally if it gave its people even more rights, wrote Tsai, who is from Taiwan's pro-independence Democratic Progressive Party.

Taiwan is the only part of the Chinese-speaking world which holds free elections, and Tsai risks upsetting Beijing with her frank remarks on Tiananmen.

China has never renounced the use of force to bring what it views as a wayward province under its control and is deeply suspicious of Tsai. Chinese officials have accused her of pushing the island toward formal independence.

In Beijing, security was tight at Tiananmen Square, with long lines at bag and identity checks. The square itself was peaceful, with hundreds of tourists stopping to take photos in the early summer sun.

Story continues

While most state media made no mention of the sensitive anniversary, the English version of popular Beijing-based tabloid the Global Times wrote in a commentary that people in China had put the events of 1989 behind them.

"The annual hubbub around the June 4 incident is nothing but bubbles that are doomed to burst."

China dismissed a statement by the U.S. Department of State on the political turbulence in 1989, urging the United States not to harm bilateral ties, the official Xinhua news service reported.

Tsai said Taiwan understood the pain caused by Tiananmen because Taiwan had similar experiences in its struggle for democracy, referring to repression under the martial law enforced by the Nationalists over the island from 1949 to 1987.

"I'm not here to give advice about the political system on the other side of the Taiwan Strait, but am willing to sincerely share Taiwan's democratic experience," she said.

In Hong Kong, which returned to Chinese rule in 1997 and is the only place on Chinese soil where June 4 commemorations are tolerated, around 125,000 people attended the main candlelight vigil in Victoria Park, according to organizers' estimates, which local broadcaster RTHK said was the lowest attendance since 2008.

The police estimated attendance at 21,800.

In a sign of persistent tensions around Hong Kong's future and its relationship to mainland China, an activist shouting for Hong Kong independence tried to rush the stage at the vigil.

A number of university students boycotted the main vigil and instead held separate on-campus events discussing the city's current political situation instead of just commemorating the events of 1989.

Reuters estimated about 2,000 people attended events at local universities.

Pro-Beijing groups cordoned off areas near Victoria Park where they set up mainland Chinese flags and shredded yellow umbrellas to symbolize Hong Kong's 2014 street protests that called for democratic reforms but failed to achieve them.

(Additional reporting by Faith Hung, and Ben Blanchard in BEIJING, Venus Wu, Teenie Ho, Tris Pan, Sue-Lin Wong, Hera Poon, Joyce Zhou and Clare Baldwin in HONG KONG; Editing by Paul Tait and Hugh Lawson)