Cuban security forces have arrested the men who hijacked a passenger ferry in a bid to reach the United States and rescued the nearly 50 hostages held on board, the government said today.

The rescue operation was carried out Thursday afternoon, according to a communique read on state television. Reporters near the scene of negotiations at the Mariel port west of Havana noticed a large military presence in the area at the time.

"All of those who were on the boat were safely rescued without a shot or even a scratch," the government statement said.

A special forces team moved in to arrest the hijackers -- said to be armed with pistols and knives -- and secured the ferry after hostages took cues from Cuban officers and started jumping overboard, the statement said.

Once the security forces took control of the boat, military divers waiting nearby helped the hostages swim to safety.

The hijackers also jumped overboard but they were captured and taken away in a boat.

The government statement did not say how many suspects were arrested and how many hostages were freed.

The government previously said about 50 people were aboard the boat, the Baragua, when it was hijacked early Wednesday in Havana Bay. The hijackers later freed three adult captives, who were ill.

Cuban authorities towed the ferry to Mariel on Wednesday after it ran out of fuel during a 30-mile chase into international waters.