WASHINGTON/ISLAMABAD -- Pakistan Prime Minister Imran Khan was ousted from office in a no-confidence vote in parliament in the early hours of Sunday after three years and seven months in power. 

A new government will be formed most likely under opposition leader Shehbaz Sharif, after parliament reconvenes on Monday to vote for a new prime minister.

The nation of more than 220 million people lies between Afghanistan to the west, China to the northeast and India to the east, making it of vital strategic importance.

Since coming to power in 2018, Khan's rhetoric has become more anti-American, and he expressed a desire to move closer to China and, recently, Russia -- including talks with President Vladimir Putin on Feb. 24, the day the invasion of Ukraine began.

At the same time, U.S. and Asian foreign policy experts said that Pakistan's powerful military has traditionally controlled foreign and defense policy, but Khan's sharp public rhetoric had an impact on a number of key relationships.

Here is what the upheaval, which comes as the economy is in deep trouble, means for countries closely involved in Pakistan:

AFGHANISTAN

Ties between Pakistan's military intelligence agency and the Islamist militant Taliban have loosened in recent years.

Now that the Taliban are back in power in Afghanistan, and facing an economic and humanitarian crisis due to a lack of money and international isolation, Qatar is arguably their most important foreign partner.

"We (the United States) don't need Pakistan as a conduit to the Taliban. Qatar is definitely playing that role now," said Lisa Curtis, director of the Indo-Pacific Security Program at the Center for a New American Security think-tank.

Tensions have risen between the Taliban and Pakistan's military, which has lost several soldiers in attacks close to their mutual border. Pakistan wants the Taliban to do more to crack down on extremist groups and worries they will spread violence into Pakistan. That has begun to happen already.

Khan had been less critical of the Taliban over human rights than most foreign leaders.

CHINA

Khan consistently emphasized China's positive role in Pakistan and in the world at large.

At the same time, the $60 billion China-Pakistan Economic Corridor (CPEC) which binds the neighbors together was actually conceptualized and launched under Pakistan's two established political parties, both of which are set to share power in the new government.

Potential successor Sharif, the younger brother of three-time former prime minister Nawaz Sharif, struck deals with China directly as leader of the eastern province of Punjab, and his reputation for getting major infrastructure projects off the ground while avoiding political grandstanding could in fact be music to Beijing's ears.

INDIA

The nuclear-armed neighbors have fought three wars since independence in 1947, two of them over the disputed Muslim-majority territory of Kashmir.

As with Afghanistan, it is Pakistan's military that controls policy in the sensitive area, and tensions along the de facto border there are at their lowest level since 2021, thanks to a ceasefire.

But there have been no formal diplomatic talks between the rivals for years because of deep distrust over a range of issues, including Khan's extreme criticism of Indian Prime Minister Narendra Modi for his handling of attacks on minority Muslims in India.

Karan Thapar, an Indian political commentator who has closely followed India-Pakistan ties, said the Pakistani military could put pressure on the new government in Islamabad to build on the successful ceasefire in Kashmir.

Pakistan's powerful army chief General Qamar Javed Bajwa said recently that his country was ready to move forward on Kashmir if India agrees. Read full story

The Sharif dynasty has been at the forefront of several dovish overtures towards India over the years.

UNITED STATES

U.S.-based South Asia experts said that Pakistan's political crisis is unlikely to be a priority for President Joe Biden, who is grappling with the war in Ukraine, unless it led to mass unrest or rising tensions with India.

"We have so many other fish to fry," said Robin Raphel, a former assistant secretary of state for South Asia who is a senior associate with the Center for Strategic and International Studies think-tank.

With the Pakistani military maintaining its behind-the-scenes control of foreign and security policies, the change of government was not a major concern, according to some analysts.

"Since it's the military that calls the shots on the policies that the U.S. really cares about, i.e. Afghanistan, India and nuclear weapons, internal Pakistani political developments are largely irrelevant for the U.S.," said Curtis, who served as then-U.S. President Donald Trump's National Security Council senior director for South Asia.

She added that Khan's visit to Moscow had been a "disaster" in terms of U.S. relations, and that a new government in Islamabad could at least help mend ties "to some degree."

Khan has blamed the United States for the current political crisis, saying that Washington wanted him removed because of the recent Moscow trip. Washington denies any role.

(Additional reporting and writing by Sanjeev Miglani; Editing by Mike Collett-White, Nick Macfie and Jonathan Oatis)