Five migrants have died as a German nonprofit organization and the Libyan coast guard tried to rescue them from their foundering boat in the Mediterranean, with each side blaming the other for botching the operation.

Germany's Sea-Watch said Tuesday its rescue ship was helping migrants on the sinking inflatable boat in international waters off the Libyan coast Monday morning when a Libyan coast guard boat also began to simultaneously take migrants onboard.

Sea-Watch said the Libyan coast guard caused panic by "beating and threatening" the passengers, before driving off at high speed with people clinging to the side.

Five people, including a child, were killed and 58 rescued by Sea-Watch.

Libya blames Sea-Watch for the fatalities, saying they interrupted the coast guard's rescue work "despite our appeals."