ISLAMABAD, Pakistan — In a sudden erosion of military privilege and impunity, a Pakistani court indicted the former ruler Pervez Musharraf on Tuesday in connection with the 2007 assassination of former Prime Minister Benazir Bhutto — the first time that such a senior general has faced criminal charges.

The court filed three charges against Mr. Musharraf, 70, including murder and conspiracy to murder, said a prosecutor, Chaudhry Muhammed Azhar. He spoke after the court’s brief hearing in the garrison city of Rawalpindi. Reporters were excluded from the hearing.

Mr. Musharraf, who had previously asserted that the case against him was politically motivated, pleaded not guilty, his lawyers said. Afterward, police commandos and paramilitary rangers escorted him back to his villa on the edge of the capital, Islamabad, where he has been under house arrest since April in connection with other cases stemming from his nine-year rule, from 1999 to 2008.

The symbolism of a once untouchable general’s being called to account was potent in a country that has been led by the military for about half of its 66-year history. While the military remains deeply powerful, the prosecution of Mr. Musharraf signaled that even Pakistan’s top generals are sometimes subject to the rule of law — at least after they have retired.