An ironman competitor has died of a suspected heart attack while swimming in a race on Queensland’s Sunshine Coast.

A competitor in an ironman race on Queensland’s Sunshine Coast has died of a suspected heart attack.

The 39-year-old man died during the swimming leg of the Ironman 70.3 race on Sunday morning.

Competitors swim 1.9km before cycling 90km and running 21.1km.

“It’s been a real tragedy, we have had a death in the swim today,” Ironman Asia Pacific chief executive Geoff Meyer told ABC radio.

Paramedics and water safety officers were called to Mooloolaba shortly after 7am and attempted to resuscitate the man for half an hour.

“The team did an amazing job but were not able to revive him,” he said.

“The thoughts from the medical team is that it was a heart attack.”

Support would be given to the man’s family and event personnel, Mr Meyer said in a statement.