Four Americans and their local guide who died during a rafting trip in Costa Rica have been identified.

The Americans, all from the Miami, Florida area, were among a group of 14 friends visiting the Central American nation for a bachelor party.

In a statement, the survivors said: "What was meant to be a weekend to remember for 14 friends turned into a living nightmare."

Costa Rican officials are investigating the tour company behind the trip.

The Organization of Judicial Investigations in Costa Rica identified the victims from Saturday's accident as Ernesto Sierra, Jorge Caso, Sergio Lorenzo and Andres Dennis.

The government agency added that all the men were Florida residents between the ages of 25 and 35 years old.

The local guide was identified as Kevin Thompson Reid.

'A living nightmare'
According to a GoFundMe page set up by the survivors - some of whom have been friends since high school - the group arrived in Costa Rica on 18 October to celebrate the upcoming marriage of Luis Beltran, whose brother died in the accident.

On Saturday, they embarked on the rafting trip, after their professional guides first advised that they wait an hour for winds and rain to pass.

The 14 men boarded three separate rafts around 15:00 local time, which all capsized within five minutes, they said.

"Within minutes, all of us were careening down the river with life jackets and helmets just trying to stabilise and find something to hold on to," the survivors wrote.

"Throughout the dangerous ride down the river, all of us struggled to stay above water, swallowing lots of it on the way down as our bodies ricocheted against the rocks in the water while struggling to survive.

"Most of us were ultimately able to grab hold of rocks or barriers in or around the water and await the rescue teams to get to us."

The five victims were all swept downstream and were recovered after a five-hour search.

The Red Cross said that the accident occurred near Liverpool de Quepos on the country's Pacific coast.

Officials say rains had swollen the Naranjo River, making water sports more dangerous and increasing the possibility of flooding.

What has reaction been?
US Department of State officials say they are in touch with the group of men, who had been renting a house in Playa Hermosa de Jaco and are helping the victim's families travel to Costa Rica.

State department spokeswoman Heather Nauert tweeted that the US has extended "our deepest condolences to their families and loved ones, and extend our gratitude to Government of Costa Rica for their support in this tragedy".

Costa Rica President Carlos Alvarado said on Twitter: "In the name of the Government and people of Costa Rica I would like to express our deepest sorrow for the accident this afternoon at the Naranjo River in Quepos.

"I would like to thank all the emergency and security teams that worked diligently, and I have instructed authorities to help the victim's families."

Police are investigating the tour company, and have raided their rafting offices, according to US media.

Earlier this month, a Massachusetts man who was celebrating his honeymoon in Costa Rica was killed by flooding in Playa Dominicalito when he attempted to drive across a submerged bridge.