A man who worked on a cruise ship has been sentenced to 30 years and five months in prison after raping a passenger and attempting to throw her overboard.

Ketut Pujayasa, 29, let himself into the passenger’s room with a staff master key and sexually assaulted her as a ‘punishment’ for a perceived insult by the victim earlier in the day.

The woman fought the man off and escaped down the ship’s hallway with the cord of a curling iron, used by Pujayasa to strangle her, still wrapped around her neck and trailing behind her.

The attack happened in the Caribbean sea, five days into a cruise that began in the Florida port of Fort Lauderdale.

According to an account of events given by Pujayasa to FBI agents, the man had been boiling with rage all day before the attack.

The Indonesian national said he had knocked on the passenger’s door three times to deliver her breakfast and overheard her use a derogatory phrase which he believed to be about his mother.

After entering the woman’s cabin unauthorised, he beat her with her laptop and other objects, choked her, tried to break her neck, and strangled her with curling iron cables and telephone wires, according to US federal prosecutors.

It was the attacker's intention to throw his victim overboard, the Reuters news agency reports.

After the attack the victim was airlifted back to the United States with skull, spine and facial fractures, and a bruised kidney. She still suffers from post-traumatic stress disorder.

The ship on which the incident occurred was the Holland America line's MS Nieuw Amsterdam. Holland America is a subsidiary of Carnival Corporation.

Following Pujayasa’s initial arrest, Holland America said in a statement that it had conducted routine background checks on the worker before hiring him and that no issues had been raised. They noted that they had terminated his employment after the incident.