A family of five Danish sailors and two crewmembers have been released by Somali pirates after more than six months in captivity, Denmark's Foreign Ministry said Wednesday.

The Quist Johansens were on a round-the-world voyage when Danish naval command reported receiving a distress signal from their yacht on Feb. 24. The parents and three children ages 12-16 were captured in the Indian Ocean.

The Johansen family was captured in February by Somali pirates. The Johansen family was captured in February by Somali pirates. FacebookThe Danish foreign ministry in Copenhagen said Wednesday that all seven people were safe, doing well under the circumstances, and on their way back to Denmark.

The family had been identified previously as Jan Quist Johansen, his wife Birgit Marie Johansen, their sons Rune and Hjalte, and their daughter Naja. The Johansens are from Kalundborg, 120 kilometres west of Copenhagen.

The website SomaliReport.com said Wednesday it had been told by a pirate source that the seven Danes had been put on a small boat at 8 a.m. local time, and that the source believed a $3 million US ransom had been paid. None of this could be confirmed, it said.

The family had evidently lost their 13-metre sailing yacht named the ING.

When they were captured, the Johansens had already visited South America, the Caribbean and the Maldives and were headed for Europe, reports said. They needed to cross the Suez Canal to reach the Mediterranean.

Pirates operating off the Horn of Africa have repeatedly targeted cargo vessels for a lucrative ransom. However smaller boats have also been taken — four U.S. hostages were shot dead earlier this year, while an English couple were finally released after being held for over a year.

The chairman of the Kalundborg yacht club, Ole Meridin Petersen, said in March that the Johansen family were experienced sailors, the Daily Mail reported.

With files from The Associated Press