A man accused of raping a teenage girl while on a Mediterranean cruise ship has walked free from a Spanish court on a legal technicality because the alleged attack occurred on international waters.

The Italian man, 18, was arrested by Spanish police last week for the alleged attack on a 17-year-old British girl. The victim accused him of forcing his way into her cabin on the MSC Divina cruise ship while sailing through the Mediterranean at 5am on Thursday.

The teenager was reportedly examined by doctors in Valencia, Spain following the attack, and DNA samples taken from the scene of the alleged crime were sent for analysis.

Also on rt.com Only yes means yes: Spain promises new sexual consent law

The accused initially appeared before a judge in Valencia on Saturday, but the court refused to take action because the alleged crime occurred on international waters and didn’t involve Spanish residents, reports local newspaper Levante-EMV.

The judge went on to suggest that authorities in Britain, Italy, or Panama (where the ship is registered) look into taking the case themselves. The Italian was subsequently released without charge.

Also on rt.com Construction crane collapses on cruise ship in Bahamas, injuring at least 8 people (VIDEOS)

Following the attack, the British teen reportedly continued on the cruise with her parents toward Italy, and the ship had already departed by the time her alleged attacker was released from custody.

A spokesperson for MSC Cruises said while they would not comment on the matter as it involved guests, they are “fully cooperating with authorities overseeing the investigation.” The UK’s Foreign and Commonwealth Office said they were “providing support and assistance” to the woman, however it’s not clear if British authorities will pursue the case.

Think your friends would be interested? Share this story!