A special Pakistani court on Monday indicted former military ruler Pervez Musharraf on five counts of high treason, a charge that potentially carries the death penalty and comes as a sharp blow to the country's powerful military.

The development is the first time that an acting or former army chief has been indicted for treason in Pakistan, where the military has taken power in three coups since the country was founded in 1947.

The indictment -- the latest high drama in a series of legal cases Musharraf has faced since returning to Pakistan a little over a year ago -- also showcases the tensions between a civilian government that initiated the case and the military, which has generally been above the law.

Musharraf, who appeared in court on Monday for only the second time in the lengthy court proceedings that began in December, pleaded not guilty to all five counts and delivered a nearly 30-minute defense of his time in office.

The former general, who has been at a hospital in the nearby city of Rawalpindi after complaining of chest pains on his way to a court session in January, said he was appearing in the proceeding against the advice of his medical team.

"I am being called a traitor," he said. "I put the country on the path of progress after 1999 when the country was being called a failed and a defaulted state."

"Is this the way to reward someone for being loyal to the country and for loving the country?" Musharraf asked the court.

If convicted, Musharraf could face the death penalty but it remains unclear whether the trial will ever get that far. Musharraf's lawyers have been requesting that he be allowed to leave the country for medical treatment.

On Monday, his lawyer Farogh Naseem again requested that Musharraf be allowed to leave Pakistan, this time to visit his ailing mother in Dubai. The attorney promised his client would return to face further court proceedings.

"The mother is dying, for God's sake," said Naseem. "He will come back. He wants to face the trial. He wants his name to be cleared."

The prosecutor expressed sympathy for Musharraf, and while he didn't say whether the former military ruler should be allowed to leave the country, he didn't object either.

Musharraf took power in a 1999 coup but was forced to step down in 2008. The high treason case stems from his decision to suspend the constitution and detain a number of judges in 2007. The move backfired and led to widespread protests by the country's powerful legal community. Eventually, Musharraf was forced to step down and left the country soon after.

He returned to Pakistan in March after years in self-imposed exile, with the hope of running in the national election that was held in May. But he was disqualified from participating in the vote because of his actions while in power and has spent most of his time since battling legal cases.