Egypt's justice minister has resigned after raising an uproar by saying in a TV interview that the children of sanitation workers are too lowly to become judges.

Prime Minister Ibrahim Mahlab said in a statement that Justice Minister Mahfouz Saber resigned out of "respect for public opinion."

In an interview late Sunday with the private TV channel 10, Saber said if the children of sanitation workers became judges they would face problems and eventually suffer from depression and leave. "A judge must hail from an appropriate environment," he said.