For Pakistan, 2007 was a year of unrest and political turmoil. After seven years in power, President Pervez Musharraf faced the first direct and sustained challenges to his rule from armed Islamic groups and the political opposition. As VOA Correspondent Gary Thomas reports, the final outcome was still undecided at year's end.

Holding on to the dual jobs of president and army chief of staff since his 1999 coup, Pervez Musharraf ruled with a relatively light touch not usually exhibited by the stereotypical general that gains political power. He even lifted the government's monopoly on the broadcast media, allowing the creation of new television and radio networks.

Pakistan's current political crisis began in March, when General Musharraf suspended the chief justice of the Supreme Court for alleged misconduct.

A former U.S. deputy assistant secretary of state for South Asia, Teresita Schaffer, says President Musharraf was unhappy with the chief justice's increasing independence.

"It is very clear that these brakes imposed by the courts were just galling to him, galling and infuriating," said Teresita Schaffer. "I think you can also make a good case that the chief justice made some stupid decisions."

The dismissal sparked street protests, initially led by lawyers. The Supreme Court reinstated the chief justice in July.

But, around the same time, Islamic radicals stepped up their activities to impose Taliban-style strictures in the heart of the capital, Islamabad. After initially ignoring the militants, the government besieged and then attacked their base at the Lal Masjid, the Red Mosque, in the heart of the capital on July 10, leaving at least 100 people dead. The Islamic religious parties claim the death toll was much higher.

Meanwhile, pro-Taliban militants, based in Pakistan's wild and lawless border areas, kept up their cross-border attacks on NATO and U.S. troops in Afghanistan.

President Musharraf's actions awakened a dormant political opposition. But the two leading opposition figures, former prime ministers Benazir Bhutto and Nawaz Sharif, remained in exile, and General Musharraf had vowed to never allow them to return.

Sharif, whom General Musharraf deposed in 1999, tried to return to Pakistan in September without a pre-arranged deal with the government. He was promptly deported back to Saudi Arabia. He was finally allowed into Pakistan in November.

Bhutto, on the other hand, opened negotiations with President Musharraf to return without fear of deportation or arrest. She came back Oct. 18. But in Karachi, her convoy was attacked by a suicide bomber, leaving more than 130 people dead and some 450 people injured.

On October 6, General Musharraf easily won re-election as president from the national and provincial parliaments. But fearing the outcome of legal challenges to the vote, he imposed a state of emergency on November third. Thousands of people were detained, judges were dismissed, and independent television stations were forced off the air. The move was widely condemned.

Bowing to opposition demands, General Musharraf abdicated his military post to remain as civilian president. He has pledged free and fair parliamentary elections, without emergency rule, for January eighth.

Teresita Schaffer says he could afford to lift emergency rule because he got what he wanted from it.

"He accomplished that objective," she said. "He kicked out the judges. He is not going to let them back. Most of them are still in jail, or at least in house arrest. So he succeeded during this very brief period in changing the rules of the game in very important ways."

Christine Fair of Rand says President Musharraf will try to keep a strong grip on power by ensuring the two major parties split the vote so neither emerges from the January elections with a clear-cut victory.

"The elections are surely being rigged in such a way that no one gets a majority on their own that does not require the president to be negotiating all sorts of political alliances that will assure that whoever comes out as prime minister is very weak," said Christine Fair.

Moreover, as Teresita Schaffer points out, the bitter rivalry between the two ex-prime ministers, dating back to the 1990s, leaves the opposition divided.

"The division of the opposition is a major factor on why Musharraf is still president," she said. "Those two hate each other almost as much as Nawaz hates Musharraf."

Benazir Bhutto will be running for a seat as head of her Pakistan Peoples Party. But although Nawaz Sharif's Pakistan Muslim League will run, he has been barred from the contest.