LOS ANGELES -- The day was ending at 1660 N. Western Ave., and the residents -- all of them poor, many of them Central American immigrants -- were beginning to prepare dinner in their tiny apartments. They soon would discover where the pipes had sprung new leaks and whether the hot water still worked.

It was a typical early evening for these tenants, except for one unprecedented addition. Among them was their landlord, Dr. Milton Avol, who for the first time was living in one of his own slum dwellings and, by court order, experiencing the nightly rituals they have suffered for years.

"It's great!" said Raul Hernandez, a Salvadoran immigrant who lives on the third floor. "Now he will see the rats come out at night. He will have to listen to the men out front at midnight, yelling at the top of their lungs."

Avol, a 64-year-old neurosurgeon thought to be the first U.S. landlord ever sentenced to live in his own building for chronic housing code violations, has made no public statements since he began his 30-day stay July 13.

His apartment door bears no number, no extraordinary fact in a place where many apartments are marked only in grease pencil. But along with the usual holes and cracks, his door has a shiny, apparently new, deadbolt lock. Confined to the apartment vicinity except to make repairs on the building, Avol did not answer several loud knocks.

"I'm not ashamed to live in my building," Avol's attorney, Don Steier, quoted him as saying. During the 10 years in which the Beverly Hills physician has been charged with hundreds of code violations and sued numerous times by tenants, he has insisted that his buildings' condition was "a shared responsibility" and that his tenants were not doing their part.

"You can't live like animals and wonder why you have cockroaches," Steier said. "Some responsibility has to fall to the tenants."

Deputy City Attorney Stephanie Sautner, supervisor of a special task force targeting Avol and other allegedly negligent landlords, laughed when the remark was repeated to her. She checked off Avol's worst violations: inadequate wiring, unsanitary plumbing, rotting walls and floors, missing windows.

"Some of those are just impossible for tenants to cause," she said. "When he made a repair, he'd use untrained labor and substandard materials. He'd put new linoleum on top of rotting floors and pin it down with thumbtacks. Then, when it started to crack, he'd say, 'Look what those tenants have done.' "

According to Sautner, no other city judge has followed the lead of Los Angeles Municipal Court Judge Veronica Simmons McBeth and ordered a landlord to occupy his own building. Sautner's task force has received several phone calls from housing code attorneys in other cities, however, and has had unusual success in persuading landlords here to improve their properties since Avol was first sentenced two years ago.

In that time, Sautner estimates, the task force has brought 2,500 apartments up to code standards. "Guys started calling in, saying, 'I'm not like that Avol, I want to work with you,' " she said.

Avol's four-story, red brick and beige stucco building on a seedy commercial street just north of the Hollywood Freeway "is far from the worst in L.A.," Steier said. Sautner agreed. Avol, who according to tenants is not a flashy dresser and drives an inexpensive car, has sold his other four buildings and made several repairs on this one, apparently in anticipation of selling it, too. But tenants at 1660 N. Western Ave. still find much they do not like.

"Earlier this year, the water was coming down from the ceiling," said Carlos Diaz, a 19-year-old janitor. "Somebody came to fix it, but in two days it was coming down again." Rents range from $350 a month for a combined sitting room and bedroom and an attached kitchen, to $450 a month for a separate bedroom. Apartments of similar size, with no code violations, can be found for the same amount, Sautner said.

Avol remained free for two years after his sentencing while he exhausted his appeals. McBeth originally ordered him to spend 60 days in jail or, if he chose, a month in jail and a month under what she called "house arrest" in the apartment building. The sentence was for a probation violation stemming from an earlier conviction on several health, fire, building and safety code violations in a building he has since sold. He also has a five-month sentence still under appeal.

Avol's jail sentence, which he completed July 9 at a sheriff's detention center in the seaside community of Marina del Rey, was reduced to 15 days for good behavior. Avol could have stayed there another 15 days and avoided the 30-day "house arrest," but he insisted, his attorney said, on showing that he could be a tenant in his own building.

Authorities have added to the unusual nature of Avol's case by making him the first prisoner in the county to use a special electronic surveillance bracelet. The device is set to warn authorities if Avol strays more than 150 feet from the telephone in his apartment at night. During the day, Avol, who according to his lawyer won two Bronze Stars as a medic in World War II and has worked extra hours caring for indigent patients, is allowed to move about the building making repairs.

Whether Avol is repairing things is uncertain. None of a dozen tenants interviewed last week had seen him during the week. The building manager, who lives close to Avol's apartment, declined to comment on Avol's activities and told a reporter he was trespassing.

"Maybe he'll learn something, sleeping in that building at night when the little wildlife comes out," Sautner said. Then she added, "But I'm not that optimistic."