By MATT BRADLEY

CAIRO—An Egyptian administrative court reversed a recent statute that had expanded military and intelligence officers' powers to arrest civilians, dealing a blow to Egypt's military leadership just before it hands executive powers to an Islamist president-elect.
The ruling, which can be appealed, blocks a decree that was issued by Egypt's justice ministry on June 13, just days before a historic presidential election.
The timing of that decree, and a high-court ruling the following day that effectively dissolved an Islamist-dominated Parliament, raised concerns that Egypt's interim ruling military was expanding its power in preparation for a coup.
Tuesday's decision buoyed human-rights activists and political opponents of the armed forces. It could also serve to reduce pressure on the country's judicial system, which has faced withering criticism for a series of rulings that appeared to favor Egypt's ruling generals.
"This was a very clear, very sharp violation of Egyptian law," said Bahey Al Din Hassan, the director of the Cairo Institute of Human Rights Studies, which led several advocacy groups in filing the lawsuit against the minister of justice's decree.
Activists have campaigned for the past year to roll back former President Hosni Mubarak's law-enforcement methods, which allowed police officials to search, arrest and detain individuals with little or no legal justification. Mr. Mubarak's repressive security apparatus drew its expansive authority from a 30-year-old emergency law that Egypt's new Parliament allowed to expire at the end of May.
The ruling also rings in another victory for the Muslim Brotherhood, the 84-year-old Islamist organization whose presidential candidate, Mohamed Morsi, was named Egypt's first freely elected president when results from the run-off were announced Sunday.
Since Egypt's parliament sat in late January, Brotherhood lawmakers have battled the judiciary and ruling military. Many judges, particularly on higher courts, were appointed by Mr. Mubarak, who was ousted amid massive street protests in February 2011.
The court suspended the June 13 statute on grounds that the minister of justice, who was appointed by the military, had no authority to issue rulings granting the military legal authority over civilians, Mr. Hassan said.
The military had justified its expanded powers as necessary to confront a rising crime wave and abiding political instability.
The uprising that ousted Mr. Mubarak left the military in charge of both the affairs of state and law enforcement. Civilian police officers withdrew en masse during the violence. After many police refused to return to their posts throughout the following year, military personnel continued to arrest civilians and put them before perfunctory military trials.
More than 12,000 ordinary Egyptians faced harsh military justice throughout 2011 and 2012, human-rights observers have said.
The military has since reined in its own policing powers. But the ministerial decree two weeks ago appeared to return the military's authority in full force.
In fact, said Mr. Hassan, the decree went further by empowering the military, instead of civilian police officers, with the same powers endowed by the expired emergency law. "This is almost like the enforcement of martial law in Egypt, without name," he said.
The decree gave military personnel the right to arrest civilians for crimes as minor as participating in a strike or protest, blocking traffic or distributing information deemed opposed to the armed forces.
The administrative court's decision is unlikely to be the last word on the military's powers. The ministry of justice is seen as likely to appeal the decision. Mr. Morsi, meanwhile, is set to take office before the end of this month with powers that were curtailed early last week by a constitutional decree by the military regime. Mr. Morsi, however, will be capable of selecting his own cabinet, including the justice minister.