Two men have died after collapsing at the finish line of the Cardiff half marathon.

The runners, aged 25 and 32, are believed to have had cardiac arrests after taking part in the annual race alongside 25,000 competitors.

Local media reported that the 32-year-old collapsed in front of his wife and one-year-old child, and the 25-year-old had been running the half marathon with his girlfriend. A witness told WalesOnline that spectators tried to help save the men.

An emergency team on the finish line attended to both men, who were taken to University Hospital of Wales in Cardiff, where they died.

Half marathon organisers Run 4 Wales said the deaths were the first in the event’s 15-year history. “This is a terrible tragedy for the families. Our deepest sympathies go out to their family and friends,” said chief executive Matt Newman.

“The emergency services reacted to this terrible situation with great speed and professionalism. Everyone connected with the race is devastated,” he added.

Police said the men’s next of kin had been informed.

One runner, speaking anonymously, told WalesOnline: “I heard someone was taken ill at the end of the race, but to discover two people have died is truly shocking.

“It is a well-organised race with a lot of medical back-up. I’m just so sad for the people and their families.”

The race started at 10am on Sunday on a route that passed via the Wales Millennium Centre, the Cardiff Bay Barrage and Roath Park.

The marathon is the second-biggest half marathon in the UK, behind the Great North Run in Newcastle, attracting thousands of runners every year.

The deaths follow a fatality at the London marathon in April when 29-year-old MasterChef contestant Matt Campbell collapsed during record temperatures at the event, reaching 24.1C (73.3F).

The professional chef from the Lake District had been running his first London marathon when he collapsed and died at the 22.5 mile mark.