Pakistan's former cricketer Imran Khan has declared victory for his party in the country's general elections, promising a "new" Pakistan following a vote that was marred by allegations of fraud and militant violence.
Mr Khan, who aspires to be the country's next prime minister, said in a televised address to the nation that "thanks to God, we won and we were successful".
"If God wills, we will set an example."
Pakistan's election commission has not yet released official, final results, but Mr Khan has maintained a commanding lead according to projections by many television stations, though it was unclear if his Tehreek-e-Insaf party (PTI) would get a simple majority or have to form a coalition government.
Election officials said an official count confirming Pakistan's next government was expected later in the evening.
Mr Khan's message of a "new" Pakistan resonated with young voters in a country where 64 per cent of its 200 million people are below the age of 30, according to a United Nations report.
More than a dozen TV channels in Pakistan, based on official but partial counts, were projecting — using their own, undisclosed methodologies — that PTI was getting as many as 119 seats of the 270 National Assembly seats that were contested.
The remainder in the 342-seat lower house of parliament includes reserved seats for women and minorities. Voting for two seats was postponed after one candidate died during the campaign and another was disqualified.
Sharif rejects 'rigged' vote
But before even half the votes were counted, Mr Khan's leading rival Shahbaz Sharif, who heads the Pakistan Muslim League — the party of jailed ex-prime minister Nawaz Sharif — rejected the vote, generating fears that disgruntled losers could delay the formation of the next government. Television projections give his party 61 seats.
In a tweet on his official page, Mr Sharif said "our democratic process has been pushed back by decades", adding that "had the public mandate been delivered in a fair manner, we would have accepted it happily".
Complaints have also emerged from the independent Human Rights Commission, which issued a statement saying that in some places women were not allowed to vote.
In other areas, it said, "polling staff appeared to be biased toward a certain party", without naming the party. In the days before Wednesday's election, leading rights activist IA Rehman called the campaign "the dirtiest" in his country's troubled journey toward sustained democracy.
Analysts have expressed concern that disgruntled losers could create instability for the incoming new government, which will face mounting challenges — including a crumbling economy, a crippling debt and a raging militancy.
The election, in which Pakistanis voted for the National Assembly — the lower house of parliament — and the four provincial assemblies, marked only the second time in Pakistan's 71-year history that one civilian government has handed power to another in the country of 200 million people.
Yet there have been widespread concerns during the election campaign about manipulation by the military, which has directly or indirectly ruled Pakistan for most of its existence. The military had deployed 350,000 troops at the 85,000 polling stations.
In a tweet on his official account, Pakistan's military spokesman General Asif Ghafoor called accusations of interference "malicious propaganda".
Throughout the night and into Thursday, Khan supporters celebrated outside party offices countrywide. Most of the revellers were young men, who danced to the sound of beating drums draped in Tehreek-e-Insaf party black and green-colored flags.