MIAMI (AP) _ Immigration officials Monday night offered to release anti-Castro militant Orlando Bosch from federal prison and place him under a restrictive house arrest, his attorney said.

Bosch, a convicted terrorist who has been imprisoned since 1988 when he illegally entered the United States, could be released as early as Tuesday if he agrees to the government's terms, said attorney Raoul Cantero.

For two years, the Justice Department has sought to deport Bosch, but 31 countries have said they will not take him.

Bosch's family maintains the 63-year-old former pediatrician is suffering from ulcers and that years in prison have taken their toll.

Bosch was jailed for 11 years in Venezuela for the 1976 bombing of a Cuban jetliner that killed all 73 people aboard, mostly Cuban athletes.

After being acquitted in three trials, Bosch returned to Miami in 1988 to be reunited with his family, and was immediately arrested for violating his parole.

The Bosch controversy has been a cause celebre for Miami's staunchly anti- Castro Cuban exile community, which has held rallies and demonstrations on his behalf attended by leading politicians.

The two-page list of conditions for Bosch's release that the government set include requirements that Bosch wear an electronic monitoring device, remain at home for 21 hours a day, keep a visitors' log and allow his telephone to be monitored, said Richard Smith, director of the U.S. Immigration and Naturalization Service in Miami.

Bosch also would be subject to unannounced searches, lie detector tests and would be banned from meeting with any Cuban exile groups that advocate violence to achieve their political goals, according to Cantero.

The agreement also says the INS can alter the terms of Bosch's house arrest program at any time, and if instructed, he must present himself for deportation within 72 hours, Smith's statement said.

Attorney Henry Adorno said Bosch would agree to all the conditions except for the visitors log.

Keeping the log ''would indicate to the people of this community that he is an informant. He is not an informant. He believes that lists are kept by people like Joe McCarthy and Fidel Castro,'' said Adorno.

''This set of conditions is so ridiculous. You get more freedom in a communist country than you do with this ... it's pure harassment,'' said Myriam Bosch, one of Bosch's daughters.

The release offer signified a departure for the Justice Department, which has maintained for years that Bosch would continue his terrorist ways if released.

''It would be prejudicial to the public interest for the U.S. to provide a safe haven for Bosch. We must look on terrorism as a universal evil, even if it is directed toward those with whom we have no political sympathy,'' wrote acting-Associate Attorney General Joseph Whitley in a 1989 deportation order.

Even before the airliner bombing, in which he has denied involvement, Bosch had an extensive record of involvement in terrorist acts directed at Fidel Castro's communist government.

In 1968, he was convicted of firing a bazooka at a freighter at the Port of Miami. He was sentenced to 10 years in federal prison and was paroled in 1972.

In 1974, Bosch fled the country in violation of parole. He traveled throughout Central and South America, using aliases.