WELLINGTON, New Zealand — After a tumultuous campaign, the center-right governing party in New Zealand placed first in the country’s general election on Saturday, but failed to capture a parliamentary majority, meaning it will have to assemble a coalition if it wants to extend its nine-year hold on power.

With nearly all the votes counted, the National Party took 46 percent of the vote, beating back a late surge by the center-left Labour Party, which received 35.8 percent, according to the Electoral Commission. Smaller parties took the rest.

Late Saturday night, Prime Minister Bill English delivered a victory speech in Auckland, New Zealand’s largest city, but his main challenger, the Labour Party leader Jacinda Ardern, did not immediately concede defeat.

Mr. English, a former finance minister, took the reins in December after his predecessor, John Key, unexpectedly resigned to spend more time with his family. During the campaign, Mr. English emphasized the party’s stewardship of the economy, which has recovered strongly from the financial crisis that was underway when the National Party swept to power in 2008.