Pakistani voters on Friday were anxiously awaiting the final results of a national election that has stunned many in the country by denying Pakistan’s powerful military a widely expected landslide victory for its preferred party.

That party, led by former Prime Minister Nawaz Sharif, remained the front-runner as preliminary totals trickled in a day after the voting. But the prolonged uncertainty made clear that the military, long the guiding hand in Pakistani politics, had failed in its heavy-handed effort to gut a rival party affiliated with another former prime minister, Imran Khan.

In Punjab, the country’s most populous province, which accounts for more than half of the seats in Parliament, many candidates in Mr. Sharif’s party, the Pakistan Muslim League-Nawaz, or P.M.L.N., were neck and neck with those in the party of Mr. Khan, a popular figure who has been jailed for months.

The tight races may constitute as close to an upset as possible in a country where the military is the ultimate authority. They reflected the deep, loyal base of support that Mr. Khan has cultivated since he was ousted by Parliament in 2022, as well as his unique ability to outmaneuver the military’s playbook for sidelining politicians who have fallen out of its favor.

While Pakistan’s election commission had initially said that the results would be released early Friday morning, by noon officials had announced totals for only around 60 of the 266 seats in the National Assembly, or lower house of Parliament.

The Interior Ministry attributed the delay to a “lack of connectivity” related to security precautions. But leaders and supporters of Mr. Khan’s party, Pakistan Tehreek-e-Insaf, or P.T.I., expressed concerns that the delay could be a sign of tampering by the military.

“Any attempt to change the results overnight will be thwarted and not accepted at any cost by the people of Pakistan or the local and international observers and media,” Gohar Ali Khan, the chairman of P.T.I., said on the platform X.

Voting on Thursday was marred by a suspension of mobile phone service across the country. The Interior Ministry attributed the outages to security concerns, while analysts said they were most likely an attempt to hinder mobilization of P.T.I. supporters.

It came after a monthslong military campaign to neutralize Mr. Khan and his party. P.T.I. leaders and supporters were arrested in droves. The party was barred from using its iconic cricket bat symbol to identify its candidates on the ballot, a crucial visual cue for voters in a country with high illiteracy rates.

Mr. Khan, a former cricket star turned populist politician, was arrested in August and issued three prison terms for a variety of offenses just days before the vote. He has been barred from holding public office for a decade.

Zia ur-Rehman contributed reporting.