Image copyright Getty Images Image caption The Great Orme Cemetery in Llandudno has no grave spaces left and limited room for ashes to be buried

Wales could soon run out of space to bury its dead, the Church in Wales has warned.

A number of cemeteries have run out of plots, with some closed to new burials, while others have just years left until they are full.

Alex Glanville, from the Church in Wales, said people could no longer take for granted that they would be buried in their communities.

On Thursday, Cardiff council's cabinet agreed to spend £3m on a new cemetery.

Councillors approved plans for a new 12.5 acre cemetery about 650 metres from the existing Thornhill Cemetery.

The authority said it would provide burial space for the next 35-40 years.

About 1,350 people a year are buried by the authority's bereavement services, but it predicts an aging and growing population means Thornhill Cemetery will run out of room by June 2020.

But BBC Wales research shows the problem is not confined to the capital, with a number of councils planning what to do to address a looming shortage.

While cemeteries are run by local authorities, churchyards are managed by the Church in Wales, which says it is facing a "significant repair bill" because once graveyards are full there is no income from burials to pay for upkeep, and it is often reliant on community groups to maintain graves.

Mr Glanville said: "We can no longer take it for granted that we will have a last resting place in or near our community.

"The majority of our churchyards will soon be full and we do not have the resources to extend them or open new ones."

Image copyright Church in Wales Image caption Churches are facing large bills to maintain churchyards, such as in St Mary's, in Barry, where a wall collapsed this week

The situation varies across Wales, with councils telling BBC Wales some graveyards have just years left, while others have about a century before they run out of space.

Monkton cemetery in Pembroke, Pembrokeshire, is nearly full, with families no longer allowed to pre-purchase graves. The authority hopes it will be able to keep it open for the next five-10 years.

In Powys, two graveyards have been closed, while Machynlleth cemetery has just two years' capacity left and the council is looking for a plot of land to develop a new one.

No new grave spaces are available at Wrexham cemetery, while Caerphilly council is opening a new cemetery near Nantgarw and hoping to extend Brithdir.

In Conwy, St Agnes, Great Orme and St Gwynan's cemeteries have all run out of new burial spaces, while Erw Feiriol cemetery in Llanfairfechan, also has no room for ashes.

Since 1996, three of Gwynedd council's cemeteries have had no new space for burials, but other cemeteries are underused, while in Torfaen two cemeteries have been closed.

In Monmouthshire, the council wants to expand Llanfoist cemetery which has about eight years left, Chepstow graveyard has about 90 years remaining.

In Blaenau Gwent, the council is reviewing capacity, Flintshire estimates it has 25 years before cemeteries run out of space, while Rhondda Cynon Taf council said it had more than 100 years left in most cemeteries.

Image copyright Church in Wales Image caption A local trust has been set up to clear and restore the graveyard at the former St David's church, in Carmarthen

The Institute of Cemetery and Crematorium Management (ICCM), said the situation was now at "crisis point" and the law needed to be changed to allow graves to be re-used.

It wants existing remains to be dug up after about 75 years - if families do not object - and reburied in smaller coffins to create space for future burials.

Its chief executive Julie Dunk said: "Because of the pressures on land, due to new developments and housing, it is not always possible to find space for a new cemetery.

"Even if they do build a new cemetery, the existing one still needs to be maintained, which is the council's statutory duty, because there are no new burials it becomes a financial burden on the local authorities."

Ms Dunk said while cremation had risen since World War Two many people still wanted to be buried for cultural and personal reasons, with some religions - including the Muslim faith - only allowing burials.

"If we do not take action, we could be denying people their religious rights," she said.

However, the Union of Welsh Independents, which represents congregations that meet in about 400 chapels in Wales, said it had not heard of concerns about the shortage of plots.

"There has been a growing tendency recently to cremate and bury the ashes at the foot of the family grave," a spokesman added.

"This naturally means that there is less demand for new graves and relieves any pressure that may be on burial ground in a cemetery."