A Pakistani lawyer has thrown a shoe at the country's former leader, Pervez Musharraf, as he walked to a court room to extend his bail on charges of conspiracy to murder and violating the constitution during his time as president.

A group of around 20 lawyers protested on Friday against the former military ruler at the Sindh High Court, shouting "he's a dictator and he should be hanged" before one of them hurled the shoe, witnesses told the AFP news agency.

The shoe did not hit Musharraf, TV footage showed. Witnesses said the perpetrator was taken away by plain-clothed security officials.

Musharraf, who returned home from four years in self-imposed exile on Sunday, was in court to extend bail granted to him last week over the 2007 killing of Benazir Bhutto, the 2007 sacking of the country's judges and the 2006 killing of a Baloch nationalist leader.

Court officials said Musharraf's bail in the judges' case had been extended for another two weeks. A member of his All Pakistan Muslim League (APML) party said he had been granted a 21-day extension in the two other cases.

The ex-dictator remains hugely controversial nearly five years after he resigned in the face of impeachment proceedings and is not thought to be a serious contender at elections in May, which he has vowed to contest.

In office, he was a key US ally in the "war on terror", an alliance that became deeply controversial in Pakistan, and escaped at least three al-Qaeda assassination attempts.

Bhutto's son, Bilawal Bhutto Zardari, who is chairman of the outgoing Pakistan People's Party, has accused Musharraf of her murder.

In 2010 a UN report said Bhutto's death could have been prevented and accused Musharraf's government of failing to give her adequate protection.

Source: AFP