JOHANNESBURG - Tropical Storm Freddy is due to hit the coast of Southern Africa again on Saturday after killing at least 21 people in Mozambique and Madagascar when it first made landfall last month.

The storm is on track to break the record of longest-lasting tropical cyclone, according to the World Meteorological Organization, which said the current record is held by a 31-day hurricane in 1994.

More than 166,000 people were affected when the cyclone swept through southern Mozambique two weeks ago, washing away roads and flooding houses and schools, according to the country's national disaster management agency.

As many as 565,000 people are at risk this time around in Zambezia, Tete, Sofala and Nampula provinces, with Zambezia expected to be the hardest hit, the United Nations humanitarian agency OCHA said, citing Mozambique's disaster agency.

After making landfall overnight or Saturday morning the storm should weaken as it moves inland, but it will still cause heavy rains in the interior of Mozambique as well as southern Malawi, said French weather forecaster Meteo France, which has a cyclone-monitoring station on the island of La Reunion.

Freddy has already set the record for highest accumulated cyclone energy, a measure of the storm's strength over time, of any southern hemisphere storm in history, according to the U.S. National Oceanic & Atmospheric Administration.

The World Meteorological Organization (WMO) said it is likely to set up an investigation after the cyclone has dissipated to determine whether it broke the record for longest duration.

"World record or not, Freddy will remain in any case an exceptional phenomenon for the history of the South-West Indian Ocean on many aspects: longevity, distance covered, remarkable maximum intensity, accumulated cyclone energy amount, (and) impact on inhabited lands," said Sebastien Langlade, a cyclone forecaster at the Regional Specialized Meteorological Centre in La Reunion, in a statement from the WMO.

(Reporting by Nellie Peyton Editing by Alexander Winning and Angus MacSwan)