A ship carrying food aid hijacked by Somali pirates earlier this week was released Friday. The release follows a plea by the Somali government for help in the fight against piracy.

World Food Program spokeswoman Anja du Toit tells VOA that the ship, apprehended Wednesday 50 nautical miles south of the capital Mogadishu, was released at around midnight Friday morning.

She says negotiations began Thursday night when the contractor and a local district commissioner boarded the boat. Eight crew members and some 400 tons of food were on board the hijacked vessel.

Ms. du Toit says her agency does not have the exact details of how the two were able to get the pirates to give up the ship and leave.

"The only thing I know is that a ransom of $20,000 were demanded," she said. "Whether it's been paid, I don't know, because it's not World Food Program money, and we have not been involved in the actual negotiation process."

Ms. du Toit says that the boat returned to the Port of Merka Friday morning where it had been stormed by six gunmen two days before, and is in the process of off-loading the relief food.

The ship's release comes one day after the Somali government had asked its neighbors and other African nations to send warships and navies to patrol the coastline.

The French news agency quoted a spokesman for Somali Prime Minister Ali Mohammed Gedi as saying, "it is clear that we cannot manage to patrol our coastline."

Also on Thursday, Kenyan government spokesman Alfred Mutua warned Kenyans not to sail off the coast of Somalia because of the recent spate of hijackings and kidnappings.

Wednesday's hijacking is the second ship carrying relief food to be targeted by pirates within the last few months. In June, pirates captured a vessel carrying 850 metric tons of rice for 28,000 tsunami victims and held it and nine Kenyans hostage for three months.

Last week, pirates also apprehended a general cargo ship, which is still being held.

The World Food Program's Ms. du Toit says the latest rash of hijackings is forcing her agency to change its tactics.

"It will have a minor effect on this particular distribution, but, of course in future, we'll have to look at alternative ways of distributing our food in order to secure the safety of the people and the food involved in our operations," she said.

The agency says these changes could include trucking the food by road from Kenya or Djibouti.