Taiwan will choose a new president on Saturday, bringing new leadership to volatile relations with an increasingly belligerent Beijing. The outcome could raise or lower the risks of a crisis, giving China a potential transition point to revive engagement, or to increase the military threats that could ultimately draw the United States into a war.

China’s leader, Xi Jinping, has asserted Beijing’s claim over the self-governed island of 23 million people by sending warplanes and ships to the skies and waters around Taiwan almost daily. Washington, while maintaining “strategic ambiguity” over its plans, has helped to bolster the island’s military, and President Biden has signaled that the United States would defend Taiwan against a Chinese attack.

On Saturday, as the election kicked off, long lines formed at voting booths, and candidates were swarmed by cameras as they cast their ballots. After a week of loud rallies, the mood was one of solemn duty: people holding voting notices, nodding to friends, and quietly entering small booths to cast paper ballots that would be counted by hand after the polls close at 4 p.m.

The election’s main contest, results of which are expected by Saturday night, pits the governing Democratic Progressive Party, or D.P.P., which has promoted Taiwan’s separate identity, against the opposition Nationalist Party, which favors a more conciliatory approach to China. Chinese leaders have denounced the D.P.P. as separatists and suggested that a vote for four more years under that party would amount to choosing war over peace.

The D.P.P.’s presidential candidate, Vice President Lai Ching-te, is trying to win a third consecutive term in power for his party, which no party has achieved since Taiwan adopted direct presidential elections in 1996.