As candidates raced about Taiwan in a final push for votes in Saturday’s election, students visiting from China — who have never had a vote — crammed into a classroom at National Tsing Hua University for a lecture on a subject not taught at home: why China, too, needs elections.

The lecturer was Wang Dan, a former Tiananmen Square student leader who, after seven years in Chinese jails and stints at Harvard and Oxford universities, now teaches in Taiwan, the Chinese-speaking world’s only full democracy. He’s banned from visiting his homeland.

“The age of Communist Party rule is coming to an end,” Wang told his audience, a mix of local students and young academics from mainland China — the beneficiaries of a warming of relations across the Taiwan Strait that has increased the flow of goods and money between the two erstwhile enemies and also of tourists, scholars and ideas.

China, which claims Taiwan as its own territory, has cheered the rapprochement, calculating that a surge in direct contacts will bind Taiwan ever more closely to the mainland and advance its goal of unification. There are now 558 direct flights a week between Taiwan and China, up from none when President Ma Ying-jeou, the incumbent in a tight election race, took office in 2008 and launched a push for closer relations.

In business, Taiwan increasingly looks to China, which now accounts for more than 40 percent of its exports and is home to more than a million Taiwanese lured by China’s vast pool of cheap labor and huge market. In politics, however, the power of attraction lies with Taiwan, once a dictatorship that now, in stark contrast with China, holds regular elections and boasts a boisterous free press.

“We have what they don’t have. This will have a long-lasting effect,” Ma said of China at a news conference this week.

“Rome wasn’t built in a day,” he added, but Taiwan’s example nonetheless is prodding mainland Chinese to raise questions about “how leaders are selected.”

The Communist Party, which bans rival parties and any public questioning of its right to rule, is due to announce a new leadership — selected in secret — later this year.

Closeness of leaders fascinates

When Ma recently made a campaign stop in Hsinchu, a high-tech and education center on Taiwan’s northwestern coast, students from China turned out to listen to his stump speech — and marveled at how Ma waded into the crowd to shake hands and exchange small talk.

“Our leaders are always so far away,” said a student from Nanjing who got close enough to Ma to shake his hand. The student, who requested anonymity, said he worries that many people on the mainland are too unruly for an immediate transition to Taiwan-style democracy, but he still thinks that the current system of rigid one-party rule has to change.

State-controlled media in China have mostly played down Taiwan’s democracy or portrayed it as a raucous farce. But Saturday’s elections for both the presidency and the legislature have been widely followed on the Internet, with some Web portals in China providing special election sections and even live coverage of debates between Ma, who is a candidate for the Kuomintang, or KMT, and his rivals. His principal foe is Tsai Ing-wen, whose Democratic Progressive Party wants to keep Beijing at arm’s length. Beijing has made clear that it wants Ma to win and warned of turbulence in the event of victory by Tsai.

“No matter who wins, or who loses, I envy Taiwan and send best wishes,” said a posting by a writer identified as Menghe Caotang on a Chinese version of Twitter.

Taiwan’s example has raised a prickly question for a leadership that rejects elections as an alien and chaos-prone Western import, said Zhang Ming, a professor of politics at Renmin University in Beijing.

“Why do all the neighboring countries and regions have direct elections but not China?” Zhang said. Taiwan, he added, “shows that Chinese people can handle democracy, although it’s not perfect” and has “vigorously refuted a fallacy that democracy is not suitable for Chinese.”

Unlike previous elections in Taiwan, which have often been marred by violence or extensive cheating, this year’s poll has been far more orderly, although a weekly magazine uncovered evidence of what it described as government spying on the opposition.

Wang, the former Tiananmen student leader who is now 42, believes that the Internet and a rapid expansion in the flow of information through it will eventually allow today’s youth in China to succeed in bringing about change.

“Everyone thinks young Chinese today aren’t interested in politics. This is a myth,” Wang said. “They might feel helpless but they still want change.”

An example to follow

At the end of Wang’s three-hour lecture, mainland students rushed to pose for a souvenir photograph with the man reviled by Beijing as a “counter-revolutionary” agitator.

Public discussion of the Tiananmen Square protest movement and the massacre that ended it on June 4, 1989, is taboo in China.

A 22-year-old electrical engineering student from Fujian province, which lies just over a 100 miles away across the Taiwan Strait, said he’d heard vaguely about Wang as a high school student but didn’t know much about what happened in 1989. He decided to attend Wang’s lecture so that “I can see what a student leader is really like.” China, which has more than 1.3 billion people, can’t jump to democracy in a single bound, he said, but it can “step by step” follow the example of Taiwan, an island with a well-educated and wealthier population of just 23 million.

Before the lecture, Wang joined other Chinese exiles for a seminar.

Li Hengqing, a Tiananmen-generation activist who, like Wang, got thrown in jail after the 1989 military crackdown, said that China, though much bigger than Taiwan, has already started on a path traced by the island nation. Taiwan’s own modern political awakening began, he noted, with a KMT massacre in 1947 and took decades of struggle.

Hong Kong-based publisher Bao Pu, whose father was a senior Communist Party official who was purged and jailed for siding with students in 1989, said Taiwan’s biggest challenge to China is its stability, an order that has been reinforced not undermined by its retreat from authoritarianism. “Sooner or later, Beijing will get the message that it is their system that is unstable,” he said.

Researcher Zhang Jie in Beijing contributed to this report.