pakistan general elections
Pakistani cricket star-turned-politician and head of the Pakistan Tehreek-e-Insaf (PTI) Imran Khan (C) gestures as he delivers a speech during a campaign meeting ahead of the general election in Lahore on July 23, 2018.WAKIL KOHSAR/AFP/Getty Images

Pakistan's cricket star turned politician Imran Khan said India and Pakistan should resolve their dispute over the divided Kashmir region through talks, as he declared victory on Thursday in Pakistan's still-disputed general election.

"The leaders of Pakistan and India should sit down at a table and resolve the Kashmir issue," Khan said in a victory speech on Thursday.

Khan's party has a commanding lead in partial election results, but supporters of jailed ex-prime Nawaz Sharif alleged rigging in the vote count, calling the process an assault on democracy in a country that has a history of military rule.

Khan's success in Wednesday's election is a stunning rise for an anti-corruption crusader who has spent much of his political career on the fringes of Pakistan politics, but now stands on the brink of becoming the country's prime minister.

"God has given me a chance to come to power to implement that ideology which I started 22 years ago," Khan, 65, said in a televised speech from his house near the capital Islamabad.

Supporters of jailed former prime minister Nawaz Sharif, who accuse Khan of colluding with the still-powerful army, said the vote count was rigged in what it termed an assault on democracy in a country with a history of military rule.

Oxford-educated Khan, in the past a fierce critic of U.S. policy in the region, also called for "mutually beneficial" ties with Pakistan's on-off ally the United States, and offered an olive branch to arch-foe India, saying the two nations should resolve their long-simmering dispute over Kashmir.