Updated

Pakistan's Supreme Court charged the prime minister with contempt on Monday for defying its orders to reopen a corruption case against his political ally, President Asif Ali Zardari, sharpening a political crisis that has gripped the country.

If convicted, Prime Minister Yousuf Raza Gilani could be imprisoned and will likely lose his job.

On Monday, Gilani drove to the court himself, accompanied by his lawyer, amid tight security. Helicopters buzzed over a rainy and overcast Islamabad, and hundreds of police blocked roads leading to the court building in the capital.

Gilani said he understood the charges after they were read out and pledged to contest them.

The move was the formal start to a process that will now take weeks or months to conclude. The next session will be on Feb. 22.

The case against Zardari relates to kickbacks he and his late wife, former Prime Minister Benazir Bhutto, allegedly received from Swiss companies when Bhutto was in power in the 1990s. They were found guilty in absentia in a Swiss court in 2003.

Zardari appealed, but Swiss prosecutors dropped the case after the Pakistani parliament passed an ordinance giving the president and others immunity from old corruption cases that many agreed were politically motivated.

The bill was decried by many in Pakistan, who saw it as an attempt to subvert the law. The Supreme Court ruled it unconstitutional in 2009, and also ordered the government to write a letter to Swiss authorities requesting they reopen the case. The government has refused, saying the president enjoys immunity from prosecution while in office.

Court supporters say the judges are upholding the rule of law. But government loyalists accuse the chief justice of pursuing a personal vendetta against the president, or of acting on behalf of the army to topple the government.

Analysts say Gilani seems willing to sacrifice himself and go to jail for the benefit of his party. But no matter how it ends, the case has distracted the government from dealing with the country's ailing economy and a violent Islamist insurgency.

The political turmoil has been a problem for the United States as well, because it wants Pakistan to focus on repairing troubled relations between the two countries and help negotiate peace with the Taliban in Afghanistan.

"The case has been very destabilizing because it has increased uncertainty, and the government is always worried about its survival," said Pakistani political analyst Hasan-Askari Rizvi. "A government whose performance is poor has become poorer."