In Pakistan it seems there are only two ways prime ministers leave office - coups or assassinations

Nobody thought this would happen. Yet everybody knew it was a possibility.

When news broke of the shooting and failed attempt to assassinate Imran Khan, there was shock, panic, anger. He had revealed threats to kill him in April this year. His detractors slammed it as political theatre from a man who was trying to avoid his ouster.

Mr Khan faced a vote of no confidence which saw plenty of drama in Pakistan's National Assembly this spring and his eventual reluctant departure from Prime Minister House was swiftly followed by the resignation of his entire government.

On that evening reporting for Sky News I watched as events unfolded - yet another prime minister of Pakistan being unseated without completing a term, a surprise Supreme Court sitting at midnight and fears of a possible coup ricocheted around. The many complex layers of Pakistan's turbulent 75-year history on display in one night.

A coup was averted, Mr Khan left and said he'd be taking his fight for justice to the streets.

He was kept busy by a number of court cases against him including terrorism offences - contempt of court for alleged verbal threats made to police and judicial officials in a speech, which he denied.

Courts are often used in Pakistan to tie up politicians in red tape and keep them away from engaging in political life.

In October, Mr Khan was disqualified from running for political office for five years. Pakistan's election commission ruled he had misled officials about gifts he received from foreign leaders while in government.

And so his battle for "free and fair elections" came in the form of political rallies and eventually this "long march" to the capital drawing in crowds of thousands of people. An attempt by Mr Khan to show his popularity and pressure the establishment to let him back in.

Ironically Mr Khan had come to power amid allegations of help from the military. He was ousted amid rumours of "upsetting" the military in a disagreement over appointments of the next army chief.

Two ways for PMs to leave office

In Pakistan it seems there are only two ways prime ministers and their governments leave office, coups - political and military - or assassinations.

Pakistan's first prime minister Liaquat Ali Khan was killed on October 1951 in Rawalpindi, shot twice in the chest while he was addressing a gathering of 100,000 at Company Gardens.

Pakistan's first female prime minister and the Muslim world's first woman PM Benazir Bhutto faced an attempted assassination in October 2007.

She was killed in a gun and bomb attack a few months later in December 2007 in the same park as the country's first prime minister, now named Liaquat Gardens. I was in Pakistan that night too covering the news for hours as the reaction then too unfurled from shock to panic to anger.

And now 15 years on Mr Khan has faced down the almost inevitable but completely unacceptable silencing that great leaders of Pakistan risk.

Criticised for appeasing the extreme right

He has faced much criticism for appeasing the extreme right and spending too much time criticising politicians of the past and not enough time governing the country and steering it to prosperity.

But he is a national icon. A cricketer turned politician, loved as a hero who brought the World Cup home in 1992, revered as a politician who fights for justice and against corruption.

"You can't shoot the only hope for Pakistan," Meher Bano Qureshi, from Mr Khan's party Pakistan Tehreek-e-Insaf, tells me.

Mr Khan's calls for power to the people and his shooting have led to yet more people taking to the streets with the same call. This time in anger.