Credit…Aamir Qureshi/Agence France-Presse — Getty Images

ISLAMABAD, Pakistan — As Pakistan fell deeper into a political crisis, the country’s Supreme Court on Monday heard a challenge to Prime Minister Imran Khan’s bid to remain in power, including his move to dissolve Parliament and call for early elections.

The hearing, which was adjourned and will resume on Tuesday, came a day after Mr. Khan and his allies blocked a no-confidence vote that had been widely expected to remove him from office. That brought accusations that the prime minister’s maneuverings were unconstitutional and leading the opposition coalition to seek immediate recourse from the justices.

The highly anticipated Supreme Court ruling is expected to determine whether the no-confidence vote can take place. But many saw the hearing as a fundamental test of the Constitution that will have far-reaching implications for Pakistan’s democracy.

Early Monday afternoon, a sea of journalists, lawyers and lawmakers crammed into the courtroom, filling every seat and packing shoulder-to-shoulder in the aisles. Plastic bins and large suitcases filled with thick, yellowed law books spilled out from the attorney’s tables; portraits of chief justices of the court lined the marble walls.

Throughout the three-hour session there were several tense exchanges between Farooq H. Naek, former chairman of the Senate and a lawyer who is representing opposition parties; and the five-justice bench, led by Chief Justice Umar Ata Bandial. The justices’ tone suggested that despite many constitutional experts’ views that the court would likely rule in favor of the opposition, the verdict was far from settled.

The justices are expected to issue a verdict in the coming days. Opposition leaders have warned that the longer the hearing drags on, the more time Mr. Khan and his allies have to try to weaken the opposition or hatch further plans to remain in power.

The crisis revives the prospect of political instability in Pakistan, a nuclear power where no prime minister has served a full five-year term.

Mr. Khan, 69, is a former cricket star who came to power on a nationalist platform and pledges to tackle corruption. His popularity has taken a hit in recent months as inflation has surged.

His relationship with Pakistan’s powerful military, which has ruled the country intermittently since its independence in 1947, soured after he refused to back the appointment of a new chief of the country’s intelligence agency last year.

Mr. Khan has claimed that the opposition is acting in concert with the United States government to oust him, accusing an American diplomat of issuing a threat to Pakistan’s ambassador to the United States. American officials have denied any involvement in the campaign to remove Mr. Khan.

Already on Monday, Mr. Khan appeared to be trying to whip up public support and push ahead with his plans to hold early elections, taking steps to establish an interim government before the Supreme Court issues its verdict.

On Monday, Pakistan’s president, an ally of Mr. Khan, sent a letter to both Mr. Khan and to the leader of the opposition in the National Assembly, Shehbaz Sharif. The letter asked that they propose names for the interim prime minister of a caretaker government that would lead the country until general elections are held within 90 days.

Mr. Khan proposed the former chief justice Gulzar Ahmed — a populist judge who, like the prime minister, has professed to be on a mission to eradicate corruption — for the office of the caretaker prime minister. Mr. Ahmed retired from the Supreme Court in February.

Mr. Khan also called for a protest in the capital, Islamabad, to be held on Monday evening and accused opposition parties of trying to avoid elections out of fear of his party’s popularity.

“When elections are announced, what is the opposition doing in the Supreme Court?” he said on state-run TV.