South Korea's prime minister has resigned over the government's handling of the ferry sinking that left more than 300 people dead or missing.

Chung Hong-won's resignation comes amid rising indignation over claims by the victims' relatives that the government did not do enough to rescue or protect their loved ones. Most of the dead and missing were high-school students on a school trip.

A spokesman said President Park Geun-hye would accept the resignation, but did not say when Mr Chung would leave office.

Officials have taken into custody all 15 people involved in navigating the ferry Sewol, which sank on April 16. A prosecutor revealed investigators were also looking into communications made, as the ship sank, between a crew member and the company that owns the ferry.

Mr Chung was heckled by victims' relatives and his car was blocked at a shelter on an island near the site of the sinking.

He gave his reasoning for the resignation to reporters in Seoul yesterday.

"As I saw grieving families suffering with the pain of losing their loved ones and the sadness and resentment of the public, I thought I should take all responsibility as prime minister," Mr Chung said.

"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."

Two helmsmen and two members of the crew detained on Saturday have been formally arrested. Eleven other crew members, including the captain, were arrested earlier. The crew members are accused of negligence and failing to help passengers in need.