Official results show former cricket star Imran Khan has won in Pakistan’s polls but will need to seek out allies to form a coalition government.

After a slow count, Pakistan election officials announced on Friday that Mr Khan’s Pakistan Tehreek-e-Insaf (PTI) party had won 114 of the 269 seats being contested in the National Assembly.

The election on Wednesday gave his nearest rival, Shahbaz Sharif’s Pakistan Muslim League, 63 seats. Mr Sharif, who heads the party of jailed ex-prime minister Nawaz Sharif, has rejected the results, charging widespread fraud and manipulation.

Mr Khan declared his victory on Thursday and dismissed the allegations of fraud, calling it the most transparent election in Pakistan’s history.

Third place went to the left of centre Pakistan People’s party with 39 seats. Results from 20 seats were still being counted.

Mr Khan had earlier vowed to run the country “as it has never before been run” by fighting corruption, seeking regional cooperation and forging a new relationship with the US that was not “one-sided”.

Pakistani politician Shahbaz Sharif
Pakistani politician Shahbaz Sharif, leader of Pakistan Muslim League (AP Photo/K.M. Chaudary)

The 65-year-old proclaimed his triumph in an address to the nation before the final results were announced, pledging to create an Islamic welfare state to provide education and employment for the poor to fulfil a campaign promise to create 10 million jobs.

“Today in front of you, in front of the people of Pakistan, I pledge I will run Pakistan in such a way as it has never before been run,” he said.

He vowed to wipe out corruption, strengthen institutions he called dysfunctional and regain national pride by developing international relationships based on respect and equality.

He said the United States treated Pakistan like a mercenary, giving it billions of dollars to fight the war on terrorism in a region beset with militant extremists.

“Unfortunately, so far our relations were one-sided. America thinks that it gives Pakistan money to fight for them. Because of this Pakistan suffered a lot,” said Mr Khan, who has been critical of the US-led conflict in neighbouring Afghanistan.

He offered nothing to suggest an improvement in Pakistan’s already testy relationship with Washington since president Donald Trump’s tweets in January that accused Islamabad of taking US aid and returning only lies and deceit.

He focused on what he wanted to do for the poor in Pakistan and his vision of a country that bowed to no one, where everyone was equal under the law and taxes were paid by the rich to fund services for the less fortunate.

His campaign message of a new Pakistan seemed to resonate with young voters in a country where 64 percent of its 200 million people are under 30.

People listen to the speech of Pakistani politician Imran Khan
People listen to the speech of Pakistani politician Imran Khan (AP Photo/Anjum Naveed)

Although rights groups and minorities expressed worries ahead of the voting about radical religious groups taking part, moderate voices seemed to have prevailed: none of the 265 candidates fielded by the outlawed Lashkar-e-Taiba won.

That includes the son of co-founder and US-designated terrorist Hafiz Saeed, who has a 10 million US dollar bounty on his head.

The candidates campaigned under the little known Allah-o-Akbar Tehreek party because Lashkar-e-Taiba is banned.

However, analysts have expressed concern that disgruntled losers could create instability for the incoming government, which must deal with a crumbling economy, crippling debt and a raging militancy.

The voting was marred by a suicide bombing in the southwestern city of Quetta, the Baluchistan provincial capital, that killed 31 people as they waited to vote.

A bombing in the same province earlier this month killed 149 people, including a candidate for office.

The election marked only the second time in Pakistan’s 71-year history that one civilian government has handed power to another.