ISLAMABAD, Pakistan — Prime Minister Yousuf Raza Gilani was dismissed from office Tuesday by the courts, a victim of an intensifying conflict between the government and the judiciary that has plunged the nation into fresh political turmoil.

The Supreme Court ruled that Gilani was disqualified because of his failure to open a long-dormant corruption case against his boss, the Pakistani president, prompting speculation about whether the coalition government led by the Pakistan People’s Party can limp on.

The court’s show of power could open the way for the powerful military to try to regain power. In the immediate term, the confrontation distracts Pakistan’s attention from negotiating a deal with the United States over access to supply routes for the U.S.-led coalition in neighboring Afghanistan.