A regional attorney general has resigned in Mexico after his handling of a case involving the death of a young girl led to a public outcry.
Mexico state's Alberto Bazbaz oversaw the inquiry into the disappearance of Paulette Gebara Farah, four.
The girl was found suffocated, wedged at the foot of her own bed, nine days after she went missing, and her death declared an accident.
Questions have been raised over the state's justice system.
Paulette, who had difficulty walking and talking, was reported missing from her family's flat in Huixquilucan, an upmarket suburb of Mexico City, on 22 March.
Her disappearance generated much publicity, with missing posters going up across the capital.
A campaign to find her was launched on social networking sites such as Facebook and Twitter.
After she had been missing for nine days, police finally found her body as they recreated events on the night she disappeared.
They discovered her squeezed in between the mattress and the bed frame.
She is believed to have suffocated the same day she went missing.
Asked how police could have overlooked the body, Mr Babaz said they had been concentrating their search efforts outside the home.
Mr Babaz had earlier declared the case a "homicide investigation", and both parents and two nannies were questioned.
But on Friday, investigators said the girl's death had been accidental.
Speaking at a news conference on Tuesday, Mr Babaz said that the investigation had been conducted "in strict compliance with the law".
Only a week earlier, he had said errors had been made, such as not searching the girl's room thoroughly.
Mr Babaz said that in order for his office to carry out its duties properly it needed the trust and support of the people it served.
"Once that's lost, it's impossible to carry on," he said.
But Mr Bazbaz's resignation has not satisfied opposition politicians who believe the case highlights serious shortcomings in the state's justice system.
Leader of the opposition PRD party Jesus Ortega said the governor of Mexico state, Enrique Pena Nieto, should take responsibility for the failures in the investigation.
"Around 100 police went through this room of 10 metres... sniffer dogs searched it and they never found the body... who do they want to protect?" he asked.
He demanded an investigation into what had "really happened".