Pakistan faces days of political horse-trading after the final few election results released Saturday showed no clear majority, but a strong performance by independent candidates loyal to jailed former prime minister Imran Khan.
Khan's Pakistan Tehreek-e-Insaf (PTI) defied a months-long crackdown that crippled campaigning and forced their candidates to run as independents with a combined showing in Thursday's election that still challenged their chief rivals.
But after long delays in results that prompted further allegations the military establishment had engaged in vote-rigging, the army-backed Pakistan Muslim League-Nawaz (PML-N) declared victory as the party with the largest number of seats.
However, to form a government, the party founded by three-time former prime minister Nawaz Sharif will be forced to cut deals with rivals and independents.
The country's military chief said Saturday that elections were "not a zero-sum competition of winning and losing", and urged an end to political polarisation.
"The nation needs stable hands and a healing touch to move on from the politics of anarchy and polarisation," said General Syed Asim Munir, according to a statement from the military.
There were reports late Friday of leaders from several parties arriving in PML-N's power base of Lahore for talks.
"We don't have enough of a majority to run the government ourselves, therefore we invite the other parties and candidates who have been successful to work with us," Sharif said at his party headquarters in Lahore.
In an AI-generated video produced by PTI, Khan was credited as claiming victory for the party.
"According to independent sources, we were winning 150 national assembly seats before the rigging started," said the message posted on his X account, which featured a genuine video clip of him from a year ago with AI-generated voice and speech.
A slow counting process showed independents had won at least 99 seats -- 88 of them loyal to Khan -- by Saturday morning.
PML-N took 71 and the Pakistan Peoples Party (PPP) snapped up 53, with 15 of the elected 266-seat National Assembly still to be announced.
Minor parties between them shared 27 seats -- including the Muttahida Qaumi Movement (MQM), which took 17 -- that are likely to be of great interest to PTI in coming days.
If PTI's independents join one of them, they can take a share of the further 70 unelected seats reserved for women and religious minorities, which are allocated according to party performance in the contested vote.
Most of the seats won by Khan loyalists were in Khyber Pakhtunkhwa, where police said at least two PTI supporters were killed Friday and more than 20 wounded when they protested against alleged vote rigging in Shangla district -- the first serious post-election violence reported.
There were also protests in Peshawar, capital of Khyber Pakhtunkhwa, and Quetta in Balochistan province.
"Our results have been changed," claimed 28-year-old shopkeeper Muhammad Saleem, who joined around 2,000 PTI supporters marching in Peshawar.
"The government should recount all of our votes."
'Silver lining'
Sharif's PML-N had been expected to win the most seats, with analysts saying its 74-year-old founder had the blessing of the military-led establishment.
Khan was barred from contesting the election after being handed several lengthy prison sentences in the days leading up to the vote.
A nationwide election day mobile telephone blackout and the slow counting of results led to suspicions the military-led establishment was influencing the process to ensure Sharif's success.
"PTI as a party and political group, despite significant efforts by the civilian and military establishment, has held on to its vote bank," said Bilal Gilani, executive director of polling group Gallup Pakistan.
"It shows that the military does not always get their way -- that is the silver lining," he told AFP.
The PPP, whose popularity is largely limited to its Sindh heartland, also did better than expected.
The PML-N and PPP joined forces with minor parties to boot Khan from office in April 2022 after his PTI won a slender majority in the 2018 election.
The former international cricketer then waged an unprecedented campaign of defiance against the military-led establishment, which originally backed his rise to power.
Khan was convicted last week of treason, graft and having an un-Islamic marriage in three separate trials -- among nearly 200 cases brought against him since being ousted.
UK, US concerns over vote
Britain said it noted "serious concerns" about the election, while the United States said that "claims of interference or fraud should be fully investigated".
Caretaker Interior Minister Gohar Ejaz defended the "difficult decision" to suspend mobile phone services on security grounds.
"We were fully aware that suspension of mobile services would impact the transmission of election results across Pakistan and delay the process, however, the choice between this delay and safety of our citizens was quite straightforward," he said in a statement on Friday.
Mohammad Zubair, a 19-year-old street hawker in Lahore, said PTI supporters would not accept a PML-N victory.
"Everyone knows how many seats Khan's independent candidates have won," he said. "They don't have a symbol, or a captain, or a flag, or banners, but still we have won on the field."