A survey of NSW beaches has identified the three worst ocean swim spots in terms of water quality.

Swansea Heads Little Beach in the Hunter Region, Malabar Beach in Sydney and Surf Beach on the south coast are all rated “poor” in the 2019-2020 state of the beaches survey.

Swansea Heads Little Beach was downgraded to poor after being rated as good in last year’s survey.

Analysts found levels of faecal bacteria from time to time exceeded safe swimming limits, especially after rainfall, which led to the rating drop.

Malabar and Surf Beaches were both rated poor in last year’s survey as well.

At Malabar Beach, bacteria left in the water after a storm would often still be there after two days of fair weather, a slower recovery time compared with nearby areas.

Those three spots aside, the state’s ocean beaches were generally found to be in an excellent condition.

Of 126 ocean beaches monitored, 98 per cent per cent were found to be in a good or very good condition.

With other types of swim spots included, such as estuaries, lakes and lagoons, 89 per cent of 228 sites were rated good or very good.

“We haven’t had beaches this clean since the Beachwatch program started in 1989,” NSW Environment Minister Matt Kean said in a statement.

“While water quality results can vary year on year, based largely on the amount of rainfall we receive, this is great news for locals and visitors alike.”

The report was based on water monitoring data collected by the Environment Department’s Beachwatch program.