Musharraf had applied to the Islamabad High Court for extension of his bail in a case registered against him for placing over 60 judges under house arrest after imposing emergency rule in late 2007.
Justice Shaukat Aziz Siddiqui extended the pre-arrest bail till April 18 after hearing arguments by Musharraf's lawyer.
The judge directed Musharraf, who appeared in court wearing a bulletproof jacket under his cream shalwar-kameez, to deposit a bond of Rs 5 lakh.
Musharraf was directed by the judge to appear at the next hearing and to appear before the police if he was summoned for investigation of the case.
His lawyer asked the court to extend the bail for two weeks but the request was turned down by the judge. The judge pointed out that Musharraf should have gone to a sessions court to seek the extension of his bail.
Musharraf's lawyer said he had come to the High Court because of security concerns. Musharraf was late in arriving at the court by over half an hour, and his lawyer attributed the delay to security concerns.
At this, Justice Siddiqui remarked, "We are not here to wait for him. He should be here on time. Everyone is equal before the law".
When Musharraf finally drove into the court complex in a motorcade of two black SUVs escorted by police vans, he found that the judge had gone for a tea break.
The former President had to wait for about 25 minutes in his SUV till the judge returned to the courtroom. The court complex was surrounded by police and paramilitary personnel.