Almost all Scottish beaches meeting environmental standards
Scotland's designated bathing waters met environmental quality standards in 99% of locations this summer.
The figures represent the best results since 2015 when tighter standards first came into force.
Work to ensure a "step change" at both Ayr (South Beach) and Rockcliffe in Dumfries and Galloway has seen improvement in their ratings.
It means that only Dhoon Bay in south west Scotland remains with a "poor" rating out of 85 sites measured.
The number of locations graded as "excellent" has now reached 32 - the highest in the past six years.
The Scottish Environment Protection Agency (Sepa) highlighted work done at Ayr (South Beach) after being classified as "poor" for four years in a row.
Another year at that level would have seen it lose its designated bathing water status.
However, pollution control measures and a largely dry summer have seen a "significant" improvement with the waters now rated "good".
Rockcliffe on the Solway Coast has also been categorised as "poor" since 2017 but temporary water treatment at nearby Kippford has seen that rise to "excellent".
It is hoped work on a permanent solution for sewage treatment in the area can see the status maintained in future.
It means only Dhoon Bay near Kirkcudbright remains with a "poor" rating but there are ongoing efforts to improve sewage treatment from private homes in the area to tackle that issue.
Sepa chief executive Terry A'Hearn said improving the country's water environment was a "key priority".
He said the successes in Ayr and Rockcliffe showed "bold and timely action" could produce results.
Environment Minister Mairi McAllan said: "Scotland's bathing waters are so important to our environment and to people's health and well-being and it is great to see hard work and investment delivering results."
She said the improvements in Ayr were "great news" for the thousands of people who visited each year.
Scottish Water said it was "delighted" its £10m investment in the area had "positively contributed" to protecting its designation.
The overall picture across Scotland was:
- Highlands and Islands - eight excellent, seven good, one sufficient
- Lothian, mid Scotland and Fife - nine excellent, three good, four sufficient
- North East Scotland - seven excellent, nine good, one sufficient
- Solway - one excellent, three good, two sufficient, one poor
- South East Scotland - seven excellent, five good, three sufficient
- West Scotland - eight good, six sufficient
The full breakdown of results for all 85 locations is available on Sepa's website.