MIAMI -- A federal judge yesterday ordered anti-Castro militant Orlando Bosch released from federal custody, ruling that a parole commissioner's decision to detain Bosch was "totally arbitrary and capricious."

The government appealed the ruling by U.S. District Court Judge Kenneth L. Ryskamp. The 11th U.S. Circuit Court of Appeals in Atlanta is expected to rule soon.

The Immigration and Naturalization Service considers pediatrician Bosch, 61, an illegal alien because he entered the country without a visa.

Ryskamp lambasted the parole commissioner who ordered Bosch detained when he arrived in Miami Feb. 16. He also set strict conditions for Bosch's release, among them a prohibition on public appearances and a warning to his loyal, often-outspoken supporters to avoid "disruption in the community."

Bosch returned to Miami 14 years after he stopped reporting to a federal parole officer. He was on parole after serving four years of a 10-year sentence after his 1968 conviction for his involvement in a rifle attack on a Polish freighter in Miami.

Meanwhile, he was imprisoned for 11 years in Venezuela after the 1976 bombing of a Cubana airlines jet that killed 73 people. He was twice tried and acquitted of the bombing.