RAWALPINDI, Pakistan -- In an unprecedented ruling that tests the military's aura of inviolability, a court indicted former president and army chief Pervez Musharraf Tuesday on murder charges stemming from the 2007 assassination of ex-Prime Minister Benazir Bhutto.

Musharraf, who became a key U.S. ally in the wake of the Sept. 11, 2001 terror attacks, pleaded not guilty.

The decision by the court in Rawalpindi marked the first time a current or former army chief has been charged with a crime in the country.

Musharraf, a 70-year-old former commando who took power in a 1999 coup and stepped down from office in disgrace nearly a decade later, now faces a string of legal problems that in many ways challenge the military's sacrosanct status in Pakistani society.

The retired general was charged with murder, conspiracy to commit murder and facilitation for murder, said prosecutor Chaudhry Muhammed Azhar.

He did not detail the accusations against Musharraf, but prosecutors have alleged he failed to provide enough protection to Bhutto as she led her Pakistan People's Party in a parliamentary election that might have given her a third term as prime minister. She was killed in a gun and bomb attack at a rally in Rawalpindi, near the capital, Islamabad.

The charges also include clearing the scene of a crime and destroying evidence, Azhar said.

Bhutto was respected by many Pakistanis for her condemnation of militancy and support for the poor. But her premiership was marred by accusations of widespread corruption.

Her assassination set off protests across the country and helped propel her party to power in parliament and her husband to the presidency.

Bhutto's supporters say Musharraf ignored requests for additional security, and a 2010 U.N. report on her death said he failed to make serious efforts to ensure Bhutto's safety.

The court also harshly criticized investigators for hosing down the crime scene, failing to perform an autopsy and quickly blaming a Taliban commander for the assassination.

The prosecutor said he has a list of 148 witnesses and documents including a note Bhutto sent to a close friend complaining that Musharraf was not providing her with proper security.

The judge set Aug. 27 as the next court date to present evidence. But Pakistan court cases can drag on for years, and convictions are often overturned on appeal.

But analysts questioned whether the evidence would be sufficient.

"To me, it would be very difficult to prove unless they can show an order by him," said Hasan Askari Rizvi, an independent political analyst. "You can't really get hold of a president simply because security was not adequate."

The chief U.N. investigator looking into Bhutto's death, Heraldo Munoz, wrote in an article in Foreign Affairs magazine that Bhutto feared militant sympathizers within Musharraf's government. But Munoz, who has authored a book on the investigation, said Bhutto likely didn't think Musharraf actually wanted to kill her.

"Even Bhutto, despite her email pointing a finger at Musharraf, probably did not believe that Musharraf wanted her dead -- only that some people around him did," he wrote.

Musharraf's supporters have described the Bhutto case and others against him as politically motivated.

"These are all fabricated cases. There is nothing solid in all these cases," said Afshan Adil, a member of Musharraf's legal team.

Musharraf returned from the brief hearing to his plush suburban house in Islamabad where he is under house arrest in another case.

The prosecutor said he has a list of 148 witnesses and documents including a letter Bhutto sent to a close friend complaining that Musharraf was not providing her with proper security.

The judge set Aug. 27 as the next court date to present evidence. But Pakistan court cases can drag on for years, and convictions are often overturned on appeal.

Musharraf became president a few months before the Sept. 11 attacks and U.S.-led invasion of neighbouring Afghanistan propelled him into the international spotlight as a U.S. ally and foe of Islamic militancy.

After stepping down as president he retired into safe exile, and many were puzzled by his decision to come back to legal problems and unpopularity.

He vowed to take part in the May elections but was disqualified -- for life -- and his legal problems snowballed. He has little popular support in Pakistan and even the military was believed not to want him back.

The charges against him put the military and newly elected Prime Minister Nawaz Sharif in a delicate position. Pakistan has undergone three coups since the country's inception in 1947, one of which aborted Sharif's previous premiership and brought Musharraf to power.

The military is considered the country's most powerful institution. So the prospect of Musharraf as a normal defendant who might end up in prison with many of the people arrested by his government likely does not sit well with a military that prides itself on protecting its soldiers and officers.

"The army will view it with some concern but they will stay quiet for the time being and see how things proceed and to what extent not only Musharraf but the institution as a whole gets dragged in," said Rizvi, the analyst.

The case is also part of a strange reversal of fates for Sharif and Musharraf.

Sharif must tread carefully with the man who once put him in handcuffs. Pushing aggressively for Musharraf's conviction could force a confrontation with the military that Sharif doesn't need right now.