But with leaders of the long-ruling Pakistan Muslim League-N and other parties alleging fraud and rigging at the polls, the strong reported showing by Khan's Pakistan Justice Movement - at least 100 of 272 legislative seats won by his party so far -seemed likely to trigger a period of political turmoil rather than a smooth transition of power.
Khan said he wanted to have relations with the United States that are "mutually beneficial, not one-sided," though he did not elaborate. In the past, he has criticised the US military role in Afghanistan and strongly condemned the US deployment of drones to kill suspected Taliban extremists in the border areas of Pakistan. He also said he wanted to have good relations with China, Iran and Saudi Arabia.
A tireless campaigner who ran for parliament from five different districts and won all five seats, Khan is likely but not guaranteed to become Pakistan's next prime minister. If his party does not win 141 seats, as seems unlikely, he will need to build a political coalition to form a government, partnering with some of the parties that are now complaining loudly of fraud.
"In 2013, when I was protesting against rigging, none of these parties helped me," Khan protested in his speech.
"But I am ready to open every seat, whichever they want ... I feel this election has been the fairest in Pakistan's history, and still if any party has any doubt, we will open up the result of those constituencies for investigations."
Such an offer seems unlikely to placate the leaders of the Muslim League, led by the wealthy Sharif family, which has dominated power in Pakistan for the past several decades and was Khan's major target in the last two national elections.
Its former prime minister, Nawaz Sharif, was ousted by the Supreme Court last year after charges of financial wrongdoing were brought by Khan and others. Now, Sharif is in prison and his party appears to have suffered a fatal political blow.
It was not clear when final election results would be announced. On Thursday afternoon, TV news channels released what they said were final results from 85 legislative constituencies, showing Khan's party winning 51 seats, the Muslim League 17, the Pakistan People's Party 8 and other small parties the rest.
The election, in which millions of voters participated, marked the second democratic transition of power since 17 years of military rule ended in 2008. The campaign and election process was violently disrupted by several suicide attacks, including two in the restive southwest province of Baluchistan. On July 10, a bomber killed 145 people there, and on election day, another bomber tried to enter a polling station and detonated, killing 31.