A man has died after being trapped in rubble when a church collapsed near a railway line in Cardiff.

Firefighters, rescue dogs and a drone had been searching for the man in the wreckage of the derelict church in Splott, which collapsed at about 14:50 BST.

Two people escaped from the building – which was being demolished – and were treated for minor injures.

South Wales Fire and Rescue Service workers are trying to recover the body.

Gareth Davies, area manager for SWFRS, said the man had been trapped under a large amount of rubble.

He said: “As a service, we wish to extend our sympathies to the individual’s family at this very sad time.”

Cardiff demolition firm Young Contractors, which has been working on the derelict church for about three weeks, confirmed none of its staff were on the site at the time.

A report, prepared for Cardiff council in June 2016 ahead of work to replace a bridge nearby as part of rail upgrades, described the building as a “dangerous structure” at risk of “imminent collapse”.

Report authors Brunton Knowles warned part of the building close to the railway line was unstable and needed to be stabilised or it may “fall” and damage the tracks.

Cardiff council leader Huw Thomas said questions would have to be asked as to how the building got into the state it did, adding it had been “left to deteriorate for decades”.

As the building collapsed a warning was sent to a train heading towards the scene, but the driver did not report anything “untoward” on the line, Network Rail said.

However, South Wales Police has since confirmed scaffolding was on the tracks.

Officers have taped off part of Pearl Street close to the derelict church.

All trains were initially cancelled between Cardiff and Newport, but two lines have now reopened. Limited services are in operation as a precautionary measure.

Network Rail warned commuters rail services across the network could be affected following the incident.

A Network Rail spokesman said: “We are working with our partners, Arriva Trains Wales, Great Western Railway and Cross Country, to update passengers as and when more information becomes available.”

Cardiff North MP Jo Stevens tweeted: “This is awful news from #Adamsdown my thoughts are with the victim’s family & friends”.

The Evac emergency alert phone app – which provides information about major incidents, fires, floods and terrorist attacks – warned users all main train lines between the capital and Newport were closed.