However, Judge Federico Moreno said his ruling would have no effect on the so-called "wet-foot, dry-foot" policy.
Under this rule, Cubans stopped at sea are usually sent back home, while those who reach dry land are allowed to stay.
In this case, the group was deported because the damaged bridge was no longer attached to land.
The Coast Guard had argued that the broken bridge did not count as US soil and therefore the Cubans could not seek residency.
Judge Moreno, who was asked to rule on whether the bridge was US territory, found the Cubans had been removed illegally in January.
But he insisted his ruling was limited to this particular case.
It is not known whether President Fidel Castro will allow the group to leave Cuba.
The deportation in January infuriated the politically influential Cuban-American community in Florida.
They wanted the court to define US soil as anywhere within US territorial waters.
Exile groups believe Cubans trying to reach the US should be allowed to stay because, they say, they are fleeing an oppressive government.
Last month, Florida Senator Mel Martinez, a Republican, called for an overhaul of the "wet-foot, dry-foot" policy, which he described as "a complete and utter failure".
Correspondents say the policy has become more stringent in recent years. The number of Cuban boat-people has been rising recently, with nearly 3,000 intercepted in the last fiscal year.
Some community leaders have warned that the latest deportations could affect backing for the Republican Party among Cuban-Americans, traditionally staunch supporters.
Published: 2006/03/01 12:53:29 GMT
© BBC MMVI