Every graveyard in Wales is to be checked under new health and safety rules after five people in the UK have been killed by falling gravestones.
A unsafe gravestone in Merthyr is taped to warn the public
Tens of thousands of people will be forced to carry out repairs to family graves considered to be unsafe.
In the Merthyr Tydfil Council area alone, up to 10,000 gravestones are expected to be declared dangerous.
Any loose gravestones which could topple over are being sealed with tape warning people to keep away.
Back in 2000, six-year-old Reuben Powell from Harrogate, north Yorkshire, was crushed to death when a five-foot high headstone fell on top of him.
Some councils in England have already carried out checks on stones, in some cases laying them flat to avoid them falling over.
And in Wales four years ago, a woman from Merthyr Tydfil was seriously injured by a falling gravestone while visiting Merthyr's biggest burial ground, Cefn cemetery.
Headstones have been attached simply by dowels up to now
Now the council, along with every other local authority in Wales is checking the condition of 30,000 stones at publicly-run burial sites.
They say some gravestones are so loose, they can be moved by hand.
Families with gravestones considered to be a danger to the public will have 28 days to put the problem right, at a cost of up to £90.
Some gravestones are so loose, they can be moved by hand.
Merthyr's bereavement services officer Terry Mehegan said: "Under health and safety legislation, we have a duty of care to people who come to the cemeteries and we have to test every memorial.
"The families themselves have a responsibility to make sure their memorials are safe.
"We do not wish to cause any further distress to people coming here, but these memorials will have to be tested.
"If they are not safe, they will have to be made safe."
The design of modern headstones is being altered to make them more secure.
At present memorials are kept upright using dowels connecting headstones on to a granite base fixed onto concrete.
Stonemason Andrew Phillips said: "In the future, memorials will be fixed using a ground support anchor which will connect through the granite, through the concrete, into the ground."