The landlords of 31 apartment buildings in the District agreed yesterday to spend more than $1 million to remove lead-based paint hazards and help pay for public health campaigns.

The improvements, spelled out in court agreements filed yesterday in U.S. District Court, affect tenants in about 4,000 units. Besides eliminating dangerous conditions, the landlords agreed to pay $87,000 in penalties and contribute $170,000 to child health programs. Some money will be used to buy equipment and test children for lead poisoning at community health centers throughout the District.

The Clinton administration joined with the D.C. government in going after the landlords by filing the first lawsuits under the Residential Lead-Based Paint Hazard Reduction Act, a 1992 federal law that requires landlords to provide notice to tenants about lead paint in buildings. The law also requires property sellers to disclose information about lead paint hazards before selling residences. The D.C. landlords were accused of failing to alert tenants.

At least 11 children who resided in the apartment buildings have shown signs of lead poisoning, officials said. Lead poisoning can cause serious and permanent harm to children, including damage to the nervous system and kidneys as well as learning and behavior problems. Nationwide, officials estimate that nearly 1 million preschoolers have elevated levels of lead in their blood, and specialists say the problem is most acute in cities such as the District.

Attorney General Janet Reno hailed the settlement, saying it would protect thousands of young children.

"I want to make this abundantly clear. If you are obligated to disclose lead information under this law and you ignore your obligation, the federal government will investigate and take all appropriate action," said Reno, one of three high-level federal officials who joined D.C. Mayor Anthony A. Williams and U.S. Attorney Wilma A. Lewis in announcing the civil settlements.

Although the use of lead-based paint was banned in 1978, older homes and apartments still have lead-painted surfaces. The dangers occur when particles of the paint crack, flake or peel and wind up in the the hands of children. The federal government has set up a hot line number (1-800-424-LEAD) for those who want to obtain information or report lead poisoning problems.

The court agreements were reached after months of negotiations with 1457 Park Road LLC and Cornerstone Real Estate Management, owners and managers of four buildings with 52 units; Crawford Edgewood Management Inc., owners and managers of 12 buildings with 1,558 units; Capitol Park Associates, owners of three buildings with 936 units; and Double H Housing Inc. and various partners in 12 D.C. properties and two in Maryland that have 1,370 apartment units.

Justice Department attorneys said the companies have notified tenants about lead paint and devised plans for action. The agreements are subject to the approval of judges in U.S. District Court in Washington. A separate suit was filed yesterday after talks collapsed with American Rental Management Co. and Chastleton Associates, which manages properties for Capitol Park Associates.

Carol M. Browner, administrator of the Environmental Protection Agency, and Housing and Urban Development Secretary Andrew M. Cuomo said the D.C. suits are part of a nationwide enforcement effort. Similar proceedings are in the works against dozens of landlords across the country.

"It is absolutely inexcusable that anyone renting an apartment or selling a home who knows about lead-based paint would fail to tell a family moving in. It's the least we can do for our children," Browner said.

Williams said the District plans to use a $2.5 million federal grant to help D.C. homeowners reduce lead hazards. In addition, he said, the District is offering free screening to residents. The tests are especially important for children younger than 6. To underscore that point, the officials announced the court actions at the Calvary Bilingual Multicultural Learning Center, a nonprofit organization in Northwest Washington that helps children and families.

Cuomo, Browner and Reno later joined several youngsters at the center in a discussion about lead paint and Cuomo himself had a quick blood test. He passed it, to the delight of the children who gave him a round of applause.

The legal moves were hailed by Chris Leonard, an activist with the Association of Community Organizations for Reform Now. "It's long overdue for these landlords to be held accountable," said Leonard, who is pushing for even stronger laws that would require landlords to abate problems before renting.