CAIRO (AP) — The prime minister appointed by ousted President Hosni Mubarak has resigned, Egypt’s military rulers said Thursday, meeting a key demand of the opposition protest movement.

In a failed attempt to quiet the anti-government protests, Mubarak named former air force officer Ahmed Shafiq to be prime minister shortly after the unrest began on Jan. 25. Mubarak stepped down Feb. 11 and the military took control of the country, but Shafiq remained in office at the head of a caretaker government.

A brief statement posted on the military’s official website said it had chosen former Transport Minister Essam Sharaf as the new prime minister and asked him to form a new caretaker Cabinet to run the government throughout a transition back to civilian rule.

Sharaf served in the Cabinet between 2004 and 2006. He quit amid an uproar over a series of deadly train accidents blamed on government negligence. Sharaf, an engineer by profession, has visited the anti-Mubarak protesters in Cairo’s central Tahrir Square, the uprising’s epicenter, something that endeared him to the youth groups behind the opposition movement.

“First, we ousted Mubarak. Secondly, we got rid of Shafiq. We have become again the owners of this country,” said Bassem Kamel, a member of the coalition involved in the uprising. “We are still awaiting for the other demands to be met.”

Leaders of the 18-day uprising that forced out Mubarak had been pressing the military to fire Shafiq, arguing that a prime minister sworn in by the ousted leader should not stay in office. They also argued that his Cabinet was filled with figures from the old regime.

They also want Mubarak’s National Democratic Party dissolved along with the hated State Security Agency blamed for some of the worst human rights violations during Mubarak’s rule. Other demands include the prosecution of security officials behind the deaths of protesters and the release of political prisoners.

The prompt acceptance by the military of Shafiq’s resignation shows the sensitivity of the ruling generals to the demands of the uprising’s leaders, but many in Egypt now believe the military should put its foot down and focus on restoring law and order in this country of 80 million people.

The youth groups behind the revolution had planned a large rally Friday to press demands for Sahfiq’s resignation, but the demonstration now will be used to press other demands.

Egypt has been gripped by a crime wave not seen in years, with a marked rise in armed robberies, arson and street battles between rival criminal gangs over territory. Demoralized and hated by many for their perceived brutality against protesters, security forces have yet to fully take back the streets. They numbered around 500,000 on the eve of the protests.

The military police, meanwhile, has stepped in to fill the vacuum, but its personnel don’t have the intelligence capabilities or manpower to police the country efficiently.

Beside security, one of the main tasks facing Sharaf is to revive the economy hit hard by the protests. The stock market has been closed for more than a month and foreign tourists have only begun to trickle back in small numbers. Investor confidence also has been badly hurt by the dozens of criminal investigations into corruption allegations against senior officials from the former regime.