Twenty-seven inmates at the Prince George's County detention center in Upper Marlboro were released Sunday evening in a last-minute effort to reduce overcrowding there before a meeting on jail conditions with a federal judge yesterday.

Graydon S. McKee III, chief judge of the county's District Court, arrived at the jail's cafeteria about 3 p.m. to begin the emergency bond reviews designed to bring the jail population down to the 425 maximum imposed by U.S. District Judge Frank A. Kaufman. The population limit was part of a settlement of a lawsuit brought by inmates who had complained of inhumane conditions at the jail.

Each of the freed prisoners had been held in lieu of a bond of $1,000 or less and was awaiting trial on a misdemeanor charge. Most faced charges of minor thefts, battery or drug possession, jail spokesman Jim O'Neill said. No inmate facing drug-dealing charges was considered, none had "extensive" records or had ever been convicted of a felony, he said.

Among those released were a man charged with driving while his license was suspended, who had spent 25 days in jail; a man who had been in the jail for 3 1/2 weeks on battery charges; a man charged with tampering with a motor vehicle who had been in jail for two weeks, and three persons accused of shoplifting who had spent between three weeks and two months in the jail.

Deputy County Attorney Michael O. Connaughton, who met in Baltimore yesterday to discuss the overcrowding with Kaufman and Maryland Legal Aid attorneys, representing the prisoners, said Kaufman seemed satisfied with the numbers jail officials presented. Kaufman ordered both sides in the overcrowding suit to return to him by April 22 with a joint report on more permanent ways to prevent overcrowding.

The attorneys told Kaufman about the release of defendants Sunday.

"We had some things already in mind [to reduce overcrowding] and we had planned quite frankly, to implement this week," acting jail director Michael Flaherty said yesterday. But the process was speeded up, he said, when Kaufman called last week to summon county officials to a meeting in Baltimore yesterday morning.

That meeting was called after prisoners who filed the lawsuits complained that jail officials were exceeding the limit of 425 prisoners that Kaufman had imposed. Richard Seligman, who represents the plaintiffs, called the bond reviews "very significant." He said, "They could have been doing this all along . . . I would hope they would continue to review the cases of those who can be safely released."

During the emergency bond review hearing, McKee sat at a cafeteria table with O'Neill and a bond commissioner, inspecting court, jail and police records on each of the 44 inmates brought before him. By the time he finished at 6 p.m., he had released 20 on personal recognizance, reduced 13 bonds -- which were posted by five defendants -- and released one young man to the custody of his parents. Another man, charged with violating a probation imposed by McKee himself, was simply set free, for a total of 27 released.

The jail's population, which has hovered between 430 and 440 in recent weeks, rose to 478 Friday, prison officials said. By Sunday morning, however, the population had dropped to 454. Early yesterday morning, after McKee's last-minute reviews, the population was down to 416. At noon, jail officials said; it was up to 424 -- one inmate lower than the limit imposed by Kaufman.