ISLAMABAD, Pakistan - Three militants were sentenced to life imprisonment Tuesday for plotting to kill Pakistan President Pervez Musharraf in a failed car bombing in 2002 as the U.S.-allied leader said he ordered troops to shoot anyone trying to disrupt next month's elections.

Western nations hope the Feb. 18 parliamentary polls will help bring stability to the nuclear-armed country as it battles rising attacks by al Qaeda and Taliban militants. Musharraf, who seized power in a military coup eight years ago, is facing increasingly potent challenges to his rule.

An anti-terrorism court found the three militants guilty of plotting to kill Musharraf by setting off a car bomb as his convoy passed in the southern Pakistani city of Karachi. Judges said the car did not explode because the remote control device used to detonate it malfunctioned, according to state prosecutor Naimat Randhawa.

It was not clear whether the men planned to appeal. The men were from the outlawed Harkatul Mujahideen Al-Almi militant group, which was blamed for a 2002 bombing at the U.S. consulate in Karachi that killed 14 people, police at the time said.

Musharraf has survived at least three attempts on his life, the 2002 botched attack being the first.

Pakistan has seen a surge in deadly bombings blamed on Muslim extremists over the last three months, including the bomb and gun attack on Dec. 27 that killed opposition leader Benazir Bhutto.

On Monday, nine people were killed and 52 wounded in a blast in Karachi outside a textile factory.

Arif Ahmed Khan, a top government official in the city, said forensic evidence has been collected from the scene of the bombing but "it was too early to say who was behind it or give any motive.''

Some officials have said the attacks are aimed at derailing the elections, already delayed by six weeks because of violent unrest triggered by the killing of Bhutto.

Musharraf said the polls would not be delayed again and expressed confidence they would be peaceful.

"I have said to the rangers and army shoot anyone who tries to do anything of this sort (disrupting the polls),'' he said in a speech at the opening of a new bridge on Monday. He did not elaborate.

Bhutto's party and the other major opposition grouping of former Prime Minister Nawaz Sharif are expected to do well in the elections.

On Monday, Sharif lashed out at Musharraf in a campaign speech, saying he was blindly following America and ordering antiterror operations that have left the country "drowned in blood.'' It was one of his harshest attacks on Musharraf over his alliance with Washington forged after the Sept. 11 attacks and may strike a chord with Pakistanis disenchanted with the war on terrorism.

On Tuesday, a suicide bomber blew himself up when troops opened fire as he drove a car toward a checkpoint in Mohmand, a tribal region close to the Afghan border, an army statement said. A second militant in the car was killed by gunfire.

Al Qaeda leader Osama bin Laden and his top deputy are believed to be hiding in the remote Pakistan-Afghan border area.