Protesters clashed with Egyptian security forces for a second day Wednesday over the pace of police brutality prosecutions and other grievances, raising the prospect that the country’s popular upheaval is far from over.

The clashes, which erupted outside the Interior Ministry late Tuesday, have left more than 1,000 people injured, the government said. It was some of the worst violence since the 18-day revolt that erupted five months ago and eventually forced President Hosni Mubarak to cede power to a military council.

By Wednesday evening, police in riot gear had retreated and military police were surrounding the Interior Ministry to quell the violence. More than 2,000 people were still demonstrating in Tahrir Square, the epicenter of the earlier revolt against Mubarak, and a makeshift clinic was set up to treat the wounded. Journalists were banned from taking video of the demonstrations.

Prime Minister Essam Sharaf called Wednesday for an investigation into the violence, which reportedly stemmed from protesters’ demands for accountability for corruption during Mubarak’s rule and for the deaths of demonstrators killed during police efforts to crush the popular upheaval in January and February. An estimated 850 protesters died during the uprising that culminated in Mubarak’s ouster on Feb. 11.

Sharaf insisted in an interview on Egyptian state television that Tuesday night’s clashes were “organized” to cause chaos in the nation, and he urged people not to unravel the progress made by the revolution.

He said he was dealing directly with Interior Minister Mansour el-Eissawy on the matter.

According to the Egyptian Health Ministry, at least 1,036 people were injured in the latest violence, including more than 40 policemen. About 120 of the injured were sent to hospitals, the ministry said.

In scenes that recalled the anti-Mubarak revolt, part of a series of uprisings dubbed the Arab Spring, riot police used tear gas, rubber bullets and birdshot to defend the Interior Ministry, which oversees the Egyptian police, from protesters who attacked with rocks and gasoline bombs.

By late afternoon Wednesday, Egyptian army troops arrived in armored vehicles and took over from the riot police, closing all roads to the Interior Ministry complex, news agencies reported.

The clashes underscored the growing tension between Egyptians seeking reform and the military leadership that took control of the nation after Mubarak was ousted. Many activists and relatives of those killed during the uprising are angry at what they see as continued human rights violations and a lack of justice.

Human rights groups say that few policemen involved in the killings are being prosecuted, that those being investigated have not been suspended from their jobs and that only one officer has been convicted — in absentia. The protracted trials of top government officials also have angered many Egyptians, as more than 7,000 civilians have been convicted in hasty military tribunals since January.

The clashes began after relatives of slain protesters were barred from a celebration for the families of “martyrs” at a Cairo theater, witnesses said. Security forces beat people and forced them to stay away, videos showed.

The families and demonstrators then walked to the Interior Ministry, seen as a symbol of the repressive and harsh practices of the old regime, to protest and throw rocks. Police were deployed and began shooting birdshot, rubber bullets and tear gas into the crowd, which soon grew from hundreds to thousands of people.

Protesters called for the end of military rule, and some screamed, “Now the real revolution begins.’’

By midnight Tuesday, the clashes intensified as police pushed people away from the building and into Tahrir Square. The clashes went on for hours, and protesters bled in the square. Interior Ministry security forces surrounded the square, yelling, “You want the press to see this!” and cursing at the crowd. There was no immediate sign of the military Tuesday night.

“We are not thugs,” said Samer Abdul Razek, 29, who lost a friend Jan. 28 when he was shot in the head by a sniper. Razek, a student of literature, was bleeding from a stomach wound he suffered when hit by a rock he said was thrown by security forces.

“I want this government and military rule to end,” he said.

“We are fully sympathetic to the families of the martyrs,” said Sameh Seif Elyazal, a former general and chairman of al-Gomhouria Center for Political and Security Studies and Research. “But it can’t be like this. Not with aggression. What’s happening now is not freedom.”

Mansour is a special correspondent. Branigin reported from Washington.