Pakistan’s president has dissolved parliament – a step towards early elections – following an attempt to remove PM Imran Khan from office.

It comes after parliament’s deputy speaker refused to hold a vote of no-confidence the PM was expected to lose.

Mr Khan claims the US is leading a conspiracy to remove him because of his criticism of US policy and other foreign policy decisions he has taken.

Opposition politicians ridicule the allegation, and the US has denied it.

Imran Khan visited Moscow to meet President Vladimir Putin as Russia was launching the invasion of Ukraine, He has previously criticized America’s “War on Terror”.

The Prime Minister is widely regarded as having come to power with the help of Pakistan’s army, but now observers say they have fallen out.

His political opponents seized the opportunity to demand the no-confidence vote after persuading a number of his coalition partners to defect to them.

On Sunday, Information Minister Fawad Chaudhry told MPs that Pakistani officials had been told of “an operation for a regime change by a foreign government”.

This, he said, went against the constitution and the deputy speaker chairing the session – a close ally of the prime minister – proceeded to declare the vote unconstitutional.

The opposition is furious.

They have filed a petition to the country’s Supreme Court, which is assessing whether the decision does not allow a vote of no-confidence against the prime minister is valid.

Heavy security has been deployed around government buildings and across the capital, Islamabad.

The latest twist in this unfolding political drama took the country by surprise. Opposition parties looked certain to win a vote of no-confidence against Imran Khan. Now they are hoping the Supreme Court will overrule the decision not to hold the vote at all.

Imran Khan’s popularity has been severely dented by the rising cost of living, but he still has a sizeable following and he certainly stands a better chance in fresh elections than he did in a parliamentary vote. Many of his supporters believe his narrative – that he’s the victim of attempted regime change by the US.

All eyes will now be on the position of Pakistan’s powerful military. They are widely seen as having helped Imran Khan to power in 2018.

Now an alleged rift between the two sides prompted the opposition to launch this attack on him. What role will they play in any upcoming elections?

There have been only two previous instances in Pakistan’s political history when sitting prime ministers faced a vote of no confidence, and both times Benazir Bhutto, in 1989, and Shaukat Aziz, in 2006, emerged unscathed.