How did Imran Khan win the 2018 elections in Pakistan? What factors drove him up there? Obviously the general narrative is that the military helped him. But how did the military come around to pushing him, in the first place?

To begin with, Imran Khan was an unlikely prime minister candidate in country that's no better than a conservative snake pit. One the one hand he led an un-Islamic personal life, and at the other spectrum was his open support for terror outfits. While the hardline Pakistan was baffled by his decadent personality and eternal playboy image, the other half couldn't stomach his support for terrorists.

Imran was once branded as 'Taliban Khan' after he condemned the US killing of top Pakistani Taliban commander in 2013. The cricket legend even said Taliban should be allowed to open an office in the country. He is a vocal critic of the US,  but surprisingly not in the good books of China either. 

Who Is Imran Khan? Pakistan Cricket Legend Running For Prime Minister

As it happens, the man of contradictions has won the poisoned chalice in Pakistan. According to the latest projections, Imran Khan's PTI is expected to win between 107 and 120 seats, short 137 needed for simple majority. However, Imran is expected to stitch together a coalition with the help of smaller parties and independents and form a government.

Here are the factors that helped Imran Khan:

New Pakistan slogan

Imran pitched his election wagon to the change slogan. He promised the broken country a new life, free from corruption. At every stump speech Imran highlighted the 'track record' of those who were in power earlier. He asked pithy questions on development, sought answers from predecessors on why there was no money for development - a question that resonated with the millions of poor.

Swing in Punjab

Nawaz Shari's PML-N traditionally bank on the Punjab province, which is home to more than half of Pakistan's population. However, this time anger against Sharif was palpable in his traditional bastion. The corruption conviction in the Panama papers case eroded Sharif's trust in Pakistan's heartland. A swing away from Sharif and PML-N obviously helped Imran Khan.

Global trend

Analysts have said Imran Khan embodies the new global outlook for a national leader - that of an outsider who calls into question decades of establishment rule. According to Michael Kugelman of the Woodrow Wilson Centre in Washington, Imran is in the line of "maverick, unconventional, and shoot-from-the-hip national leaders". "For Imran Khan's legion of devoted followers, he represents the new, bold, incorruptible leader that the country has long sought," Kugelman told Al Jazeera.

Strategic use of 'electables'

The Oxford-educated elite, whose party got only 35 seats in the last national elections in 2013, changed his tack this time around. Imran shamelessly drafted in turncoats, political floor crossers and the opportunists. They were sweetly re-named as the electables. it was reputed that more than 20 lawmakers PML-crossed floors to join the Imran bandwagon in the run-up to the election.

Military help

Nawaz Sharif has said the all-powerful Pakistani military had forced leaders from his party to switch sides. It was alleged that the military was threatening political leaders with corruption cases if they were not willing to join Imran's PTI.

Imran reshaped PTI as the 'pragmatic party'

PTI Imran Khan
Pins with images of Imran Khan, leader of the Pakistan Tehreek-e-Insaf (PTI), are pictured at a market a day after general election in Islamabad, Pakistan, July 26, 2018.REUTERS/Athit Perawongmetha

PTI's electoral ambitions were undone in 2013 primarily because it hadn't yet become a ruthless political machine focused on winning power. The Justice Party had too much of the baggage of an ideological outfit. Many of the candidates who were fielded in 2013 lacked the cutting political edge. This time, Imran obviously chopped the scruples off and presented the candidates who knew the art of winning elections.

Consensus at highest echelons

Above all, following Nawaz Sharif's clashes with the military and the judicial system, the highest echelons of power (read military) had decided that he and PML-N will not have another term. The other alternative, if not for Imran, was the 29-yer-old Bilawal Bhutto Zardari, and that never looked viable.