Millions of Taiwan’s citizens lined up at ballot booths on Saturday to make a decision that could reshape the island democracy’s increasingly tense standoff with its far larger neighbor, China: Who should be Taiwan’s next president in dangerous times?

The voters are mainly choosing between the governing Democratic Progressive Party, which wants to keep steering Taiwan away from Beijing’s influence, arguing that this is the best way to keep the island secure, and the opposition Nationalist Party, which has vowed to expand trade ties and restart talks with China, arguing that this will reduce the risks of war. A newer party, the Taiwan People’s Party, has also promised steps to revive engagement with China.

Taiwan’s polling stations closed at 4 p.m. local time, and local news stations promptly began broadcasting live video of election officials counting the ballots. The results, likely to be announced Saturday night, could ripple far beyond the island, which has become the single biggest flashpoint in the rivalry between China and the United States. Any shift in relations between China and Taiwan after the island’s next president takes office in May could intensify or ease the tensions between Beijing and Washington.

In some places, lines began forming at booths even before the polls opened at 8 a.m., with many multigenerational families showing up in groups. Taiwanese citizens must vote in person — no electronic or postal ballots are allowed — and people fanned out to reach nearly 18,000 polling stations in temples, churches, community centers and schools across the island. Votes will be counted by hand after the polls close at 4 p.m

“Taiwan’s election for a president and vice president actually affects not just the future of Taiwan, but also of Asia and even the entire world,” said Cheng Ting-bin, 56, a teacher who had just voted in Taipei, the capital. “We all know that the world is now choosing sides.”