South Korean Prime Minister Chung Hong-won has resigned amid criticism of the government's handling of the sinking of a passenger ferry.
He said the "cries of the families of those missing still keep me up at night". Mr Chung will stay in his post until the disaster is under control.
The Sewol ferry with 476 people aboard - most of them students and teachers - sank off South Korea on 16 April.
Officials have confirmed 187 died, but scores are missing presumed drowned.
Furious relatives have repeatedly criticised what they see as the slowness of the recovery operation.
"The right thing for me to do is to take responsibility and resign as a person who is in charge of the cabinet," Mr Chung said in a brief televised statement.
"On behalf of the government, I apologise for many problems from the prevention of the accident to the early handling of the disaster."
He added: "There have been so many varieties of irregularities that have continued in every corner of our society and practices that have gone wrong. I hope these deep-rooted evils get corrected this time and this kind of accident never happens again."
President Park Geun-hye accepted her prime minister's resignation but did not set a last day in office. The PM would leave his post once the ferry disaster was under control, South Korean news agency Yonhap reported.
An opposition party spokesman described it as "thoroughly irresponsible" and a "cowardly evasion" of responsibility.
The day after the disaster, Mr Chung was booed and someone threw a water bottle at him when he visited grieving parents.
Divers were battling atrocious weather conditions on Sunday as they tried to retrieve more bodies trapped in the sunken ferry.
A coastguard spokesman said heavy seas whipped up by strong winds were badly complicating recovery efforts.
"The situation is very difficult due to the weather, but we are continuing search efforts, using the occasional calmer periods," the spokesman said, adding that 93 divers would take part in Sunday's operation.
All 15 crew members involved in the navigation of the ferry are now in custody, facing criminal negligence charges.
On Friday, divers found 48 bodies of students wearing lifejackets in a single room on the vessel meant to accommodate just over 30 people.
The group was crammed into a dormitory and all were wearing lifejackets, a South Korean Navy officer said.
The presence of so many victims in the cabin suggested many had run into the room when the ship tilted, correspondents said.
The reason for the disaster is still unclear.
But prosecutors are said to be investigating whether modifications made to the ferry made it more unstable.
Factors under consideration include a turn made at about the time the ship began to list, as well as wind, ocean currents and the freight it was carrying.
Reports have emerged indicating that the ship's sleeping cabins were refitted some time between 2012 and 2013, which experts say may have inadvertently affected the balance of the vessel.