BALTIMORE (AP) _ A judge Wednesday sentenced the former federal official in charge of regulating generic drugs to five months in a work-release program, saying he left the post riddled with problems.

Marvin Seife, former chief of the Food and Drug Administration's generic drug division, was convicted in October of two counts of perjury for lying to federal investigators about meals he accepted from drug company executives.

U.S. District Court Judge John R. Hargrove also ordered Seife, who now lives in San Antonio, to spend five months in a home detention program and fined him $25,000.

Seife, 66, headed the generic drug division for 18 years before his retirement in December 1989. Seife already had retired by the time he was indicted.

He is one of 16 people convicted during a continuing investigation of bribery and fraud in the generic drug industry.

Others were FDA chemists or Seife's subordinates who admitted accepting thousands of dollars in illegal gratuities. Several executives and their companies have admitted giving the gratuities.

Hargrove said Wednesday the division ''hit rock bottom'' while Seife was in charge.

The judge said Seife was ''chief of a division riddled with all sorts of problems. ... He gave a lot of leeway to a lot of people.''

U.S. Attorney Breckinridge L. Willcox said that Seife, a doctor, was the ''arbiter of his own ethical standard.'' The federal government and consumers were victims of Seife's misconduct, he said.

''Dr. Seife, for better or worse, set the moral tone and the atmosphere (for his division). He was in a position of trust that he betrayed,'' said Willcox, who recommended that Seife be incarcerated for up to 16 months.

The maximum sentence was 10 years in prison and $500,000 in fines.

Seife's lawyer, Hamilton P. Fox, argued that Seife should not be incarcerated because of poor health. Seife also takes care of his ill wife, he said.

''This man should not be made the scapegoat for all the problems of his agency,'' Fox said.

During his trial, Seife portrayed himself as a champion of generic drugs. He said he helped small companies, many of them owned by minorities, to get their cheaper version of brand-name drugs into the market for elderly and low- income consumers.

Seife also said he befriended generic drug executives and occasionally dined with them to give them ''the necessary encouragement to gain acceptance.''

At least 14 meals that prosecutors documented in court were acknowledged by Seife, but he said that he had forgotten about them.

Fox said he will appeal the case.