Pakistan's 106 million registered voters head to the polls today to choose the country's next parliament and its next prime minister.
If everything goes to plan, this will be only the second peaceful and democratic handover of power in the country's 70-year history. This election campaign has been marred by violence, corruption and allegations of undue influence from the country's powerful military.
Security is tight as Pakistanis vote, and the day is already proving to be bloody. A bomb has exploded at a polling station in the western city of Quetta, killing at least 25 people, and there have been reports of shootings. Nonetheless, citizens are expected to descend on voting booths nationwide until their closure at 6 p.m. local time (9 a.m. ET). Results are expected Thursday morning.

Imran Khan, the leader of the center-right Pakistan Movement for Justice (PTI) party is the current front-runner in a tight race. He is sitting very slightly ahead of Shehbaz Sharif, the leader of the Pakistan Muslim League (PML-N). Sharif is also the brother of and successor to former Prime Minister Nawaz Sharif, who was barred from the contest over allegations of corruption and was arrested earlier this month.
When not held by the military, power in Pakistan has generally alternated between the PML-N and the Pakistan People's Party (PPP), formerly led by Benazir Bhutto and now headed by her inexperienced 29-year-old son, Bilawal Bhutto. This time around, the PPP is expected to finish third.
With the two main parties weak, Khan is eyeing the top prize. He has the backing of the country's powerful military establishment, which has ruled Pakistan directly for around half of the country's existence and, even when not in power, exerts fearsome influence on national politics. For some observers, a win for Khan would be a military coup by stealth.
A legendary cricket player and a former well-known fixture on London's nightclub scene, 65-year-old Khan was not molded by one of the few dynasties that have ruled Pakistan since its independence. His sporting background gives him a connection to the population that few politicians can match, and even before he became a politician his role as captain of the 1992 Cricket World Cup-winning Pakistan team made him a national hero.

Since forming the PTI in 1996, Khan has presented himself as a populist anti-corruption candidate. He has attempted to shake off his playboy image and project a more religious, conservative and serious persona in recent years. This has not been easy. Married three times, he is currently batting allegations made in a book written by his second wife depicting him as dishonest, unstable and impious.
It was not until 2013 that his PTI scored its first real electoral success, becoming the third largest party in Pakistan's parliament and netting around 17 percent of the vote. The organization struggled to overcome the far more established PML-N and PPP machines and, despite his fame, it seemed Pakistanis did not consider Khan a serious contender.
Eyeing the top job, Khan has made pragmatic moves to embrace Pakistan's powerful religious voting blocs. He came out in support of the country's conservative blasphemy laws, courted influential religious fundamentalists and recruited politicians that could deliver large voting banks. His support of a peace deal with the Taliban and other Islamist militant groups secured him additional support among the country's more fundamentalist voters. But his most effective move of all might have been aligning with the powerful military establishment.
Khan faces allegations that the PTI is working with the army to steal the vote. Some observers believe the military's implicit backing of Khan has given him an unfair edge over the competition, and the Human Rights Commission (HRC) of Pakistan said Wednesday's vote might not be fair. Indeed, officials from both the PML-N and PPP have complained about receiving threats in the run-up to the vote, supposedly from army or intelligence personnel.

In a political system riddled with corruption, Khan has positioned himself as the reform candidate. While other parties have been tarnished with repeated scandals, Khan has remained relatively clean. He has used this to his advantage, and when Sharif's family members were named as the owners of multiple London apartments in the Panama Papers leak last year, Khan was one of the leading voices pushing for an investigation. At a recent rally, Khan told supporters, "We are pitched against mafias…who made money in this country and siphoned it abroad, burying this nation in debt."
Pakistani public infrastructure is crumbling after decades of underinvestment. The national economy is foundering, forcing educated young people to leave the country in the hope of earning more abroad. Extremist groups hold significant influence, and militants are still able to launch large attacks across the country.
Khan has vowed to improve the education system to address a 40 percent illiteracy rate, revamp health care and better protect the environment. All this will form Khan's proposed "Islamic welfare state," alongside 10 million new jobs and 5 million new homes.
In foreign policy, Khan has taken a hard stance on relations with arch-enemy India, repeatedly criticizing Pakistan's neighbor for instigating conflict between the two nations. Khan has also been outspoken on U.S. foreign policy and the "war on terror," which has been enormously destructive for Pakistan.
He has suggested the country—which has been building its ties with China and Russia in recent years—reject American military aid and align itself less with Washington's interests. Khan has also been dismissive of U.S. President Donald Trump, whom he once described as "ignorant and ungrateful" after the president said that Pakistan supported terrorism.
Speaking at a rally in Lahore this weekend, Khan told the crowd it had "an opportunity to change Pakistan… You will not have it again and again." Exactly what kind of government Thursday will bring remains to be seen, but a new prime minister will need to balance military influence, the threat of terrorism, prickly foreign relations and crippling economic inertia. Whoever is at the helm, the challenge is a daunting one.