According to the police, it was staff on the boat who first became aware of the crime and were able to apprehend the four men, who are said to be in their 20s.
Staff on the boat secured the crime scene and took care of the woman until the boat arrived in Stockholm, says the police's press spokesperson Mats Eriksson.
The police then took over the arrest and took the men to the police station. The woman, who is also in her 20s, has been taken to hospital.
A crime scene investigation has been conducted on the ferry where the relevant cabin was cordoned off, according to TV4 News.
The suspects were questioned during the day by Swedish police, but were then released after a decision by a Finnish prosecutor. This because the suspected crime took place in Finnish waters.
According to Finnish media, both the victim and the suspects are from Finland.