The communique read on state television said the rescue operation was accomplished on Thursday afternoon, when international journalists near the scene of negotiations at Mariel port, west of Havana, noted a large military presence in the area.
"All of those who were on the boat were safely rescued without a shot or even a scratch," it said.
The Special Forces team was able to arrest the armed men and secure the ferry, the Baragua, after hostages taking cues from the officers began to throw themselves off the side of the boat into the water, disorienting their captors, the statement said.
Once troops took control of the boat, military divers waiting nearby underwater helped the hostages who had jumped into the water get to safety.
The hijackers then also jumped into the water, where they where grabbed by authorities and taken away on a boat.
Although the government had warned earlier Thursday it would use force if necessary, Friday's statement said "it was not necessary to any of the other variants considered."
The statement left out many details, including how many suspects were arrested and exactly how many hostages had been safely freed. The government initially had said there had been about 50 people aboard the boat when it was hijacked early Wednesday in Havana Bay and that the hijackers later freed three adults who were ill.
Also unknown were the identities of the suspects, where they were taken and what they will be charged with.
A government television program about the ferry hijacking, as well as the hijacking of a plane earlier this week, was scheduled to air Friday evening.
There was no mention in the statement of President Fidel Castro, who traveled to Mariel on Thursday to lead the effort to end the standoff.
International journalists saw Castro's motorcade leave the port Thursday afternoon after an ambulance sped away from the scene for unknown reasons. There was no mention in the government's Friday statement of any injuries.
"Force will be used if the hostages' situation becomes critical," its earlier statement from Thursday had warned.
Cuban authorities escorted the ferry to Mariel on Wednesday after a 48 kilometer (30-mile) chase into international waters. The men threatened passengers and demanded enough fuel to reach the United States, officials said.
At one point, a hijacker held a knife to the throat of one of the women on the ferry.
After Castro's motorcade drove away from the scene of the standoff on Thursday, seven other ambulances and a military convoy left, and only a few people could be seen near the ferry.
After the ferry was hijacked in the early hours of Wednesday, the Cuban Coast Guard chased the boat into international waters.
The FBI flew negotiators to a nearby U.S. Coast Guard cutter to offer help to the Cubans as they tried to persuade the hijackers to surrender. Cuban authorities, however, handled the situation alone, officials from both countries said.
The seizing of the vessel came a day after a Cuban passenger plane was hijacked to Key West, Florida, by a man who allegedly threatened to blow up the aircraft with two grenades that later turned out to be fake. Another Cuban plane was hijacked to Key West less than two weeks earlier.
The hijackings coincided with a crackdown on dissidents in Cuba and rising tensions with the United States. Trials began Thursday for the first of 80 dissidents charged with conspiring with U.S. officials.
In the past, Cubans have taken advantage of periods of U.S.-Cuban friction to try to flee the island.
In a highly unusual move, the top U.S. diplomat in Havana on Wednesday night warned Cubans not to undertake any more hijackings, telling them in a message read on communist-run television they would be prosecuted and lose the right to seek American residency.
The message by James Cason, chief of the U.S. Interests Section, demonstrated growing concern about the possibility that such hijackings could end in violence or spark a migration crisis.
Several ferry boats were hijacked to the United States in 1994, when some 35,000 Cubans headed toward Florida in dilapidated boats and rafts. The wave of illegal migrants subsided only after the United States agreed to send back Cubans picked up at sea.