South Ayrshire Council spent almost £3.4m repairing hundreds of grave sites that were flooded in 2022.
Remedial work at Ayr Cemetery, which began after an entire area was flooded and more than 100 graves were damaged, has now been completed.
An extension of Troon cemetery was also found to be waterlogged at the same time, with around 50 plots occupied at the time.
Hundreds of bodies were exhumed at both Ayr and Troon cemeteries during the restoration process.
Repair work carried out at Ayr Cemetery cost £2.6m, while some £744,000 was spent on repairs at Troon.
The council said the costs included supporting affected families and requests for new coffins, flowers, a minister, a hearse, a piper and the services of a funeral director.
The bill also included the relocation of headstones when required.
A South Ayrshire Council statement said: “At the outset, we made a commitment to the affected families that we would do everything possible to resolve any issues with the burial chambers at Ayr and Troon cemeteries.
“We also said to families that we would support them in any way that we could.
“By working with a number of specialists we have now concluded the works at Ayr and Troon cemeteries.
“We are still in contact with a number of families, and this will continue.”
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country