LET’S STIPULATE: There are very likely good grounds to prosecute deposed Egyptian ruler Hosni Mubarak. In nearly 30 years in power, the strongman appears to have amassed a considerable fortune, including the luxurious beach estate to which he retreated after his overthrow. More than 800 people were killed during the 18-day revolution, and prosectors allege that Mr. Mubarak approved plans to use force against peaceful demonstrators.

The decision by Egypt’s ruling military council and state prosecutors to begin a trial of the former strongman on Aug. 3 — before the country holds its first democratic elections — is nevertheless a mistake, one that could push Egypt off the path to establishing a stable democracy and reviving its economy. Mr. Mubarak, who is 83 and in failing health, is not entitled to impunity; nor are his family and former ministers. But the approach of the interim regime, which has jailed dozens of former officials and two of Mr. Mubarak’s sons, is deeply flawed.

The trouble starts with the speed and timing of the prosecutions. Anxious to prevent further mass protests, the interim military council has appeared to time steps against the former regime just ahead of threatened demonstrations. The announcement that Mr. Mubarak would be put on trial came May 24, three days ahead of a planned opposition gathering in Cairo’s Tahrir Square. Three of Mr. Mubarak’s former ministers have already been convicted of crimes, and other trials are moving forward quickly. There are serious questions about the evidence in at least one — a case brought against the energy minister and five associates over alleged fraud in gas sales to Israel.

The legal system handling these cases, oddly, is that of Mr. Mubarak — and was justly renowned under his tenure for its lack of independence and its politicized rulings. There’s good reason for concern that former members of the regime are now victims of that politicization. The judge hearing a murder case against former interior minister Habib el-Adly, for example, was involved in one-sided rulings against political dissidents during Mr. Mubarak’s reign. That’s particularly worrisome because Mr. Adly has become the focus of populist calls for retribution, with some opposition sloganeers demanding that he be hanged.

Egypt cannot bury a half century of authoritarianism; there must be a reckoning. But the right authority to oversee it is not a temporary military authority attempting to keep crowds out of the streets, but a democratically elected government. Investigations and trials must be conducted by prosecutors and judges who are neutral, professional and untainted by the previous regime. One leading Egyptian human rights activist, Hossam Bahgat, has suggested that Egypt follow the example of other countries emerging from dictatorship and establish a formal process of investigation and exposure of past crimes — a process that could include reparations for victims and prosecution of the most significant cases. Such an initiative could help to bolster a new democratic order in Egypt, but the rush to judgment now underway could seriously undermine it.