A U.S. District Court judge told the Department of Housing and Urban Development that it unnecessarily delayed the enforcement of a law designed to protect children from lead-based paint dangers and has set an August deadline for complying with his order.

Judge Gerhard A. Gesell's action is the latest in a lawsuit filed by tenants in a southeast Washington public-housing project after a child living in Stanton Dwellings was hospitalized with lead poisoning.

Gesell first ordered HUD to issue tougher rules for eliminating lead-based paint from public housing in Washington and throughout the country in June 1982. The decision was upheld by the U.S. Court of Appeals in August 1983.

In response to a HUD report saying that the department could not issue the rules until May 20, 1987, Gesell said last week that "further delay is unwarranted."

He also said it was unacceptable for the agency to restrict its enforcement activity to public housing. "Any existing housing . . . which is covered by an application for mortgage insurance or housing-assistance payments under a program administered by the secretary" of HUD must be covered by the regulations, he said.

HUD General Counsel John J. Knapp said last week that the department could meet the August deadline with a rule applying to public housing. But a requirement that new regulations cover all other housing programs "is a brand new element" added by Gesell, and preparing more extensive rules will be time-consuming, Knapp said.

"We . . . are trying to determine, together with the Justice Department, what options we may have" in responding to Gesell's order, Knapp said. He added that HUD plans to extend the rules to all programs but wants to deal first with public housing.

Existing HUD regulations require public-housing authorities to remove lead-based paint from their units only if it is flaking or cracking. Gesell said in his 1982 ruling that the department's "complete failure" to provide for elimination of intact, or "tight," paint "is contrary to the intent of Congress" when it passed the Lead Paint Poisoning Prevention Act.

Local public-housing agencies remove lead paint, under regulations set by HUD, which also is responsible for monitoring their compliance. HUD has "no procedure to determine if the D.C. housing department has inspected each unit of HUD-associated public housing before occupancy and eliminated immediate hazards," Gesell said.

The appeals court agreed with Gesell that the agency's enforcement is inadequate, calling lead poisoning a "serious health problem" that kills about 200 children a year and causes illness in 10,000 others, according to the opinion written by Judge Edward Tamm.

If the ruling is extended to cover houses purchased with federal mortgage insurance, it would affect hundreds of thousands of homes annually. In fiscal 1985, for example, the Federal Housing Administration, an arm of HUD, issued mortgage insurance for 360,999 single-family homes and 437,799 units of multifamily housing, according to a department spokesman. The FHA insurance program is designed to help moderate-income families.

The federal government recently filed criminal charges against 13 Milwaukee real estate brokers and home buyers, alleging that they fraudulently obtained HUD residential-loan insurance, according to U.S. Attorney Joseph P. Stadtmueller in Milwaukee and HUD Inspector General Paul Adams.

The announcement said the defendants made false statements about home buyers' qualifications so they could obtain Federal Housing Administration insurance on houses they bought.

As a result, "a large number of loans were guaranteed by HUD for financially unqualified buyers," it said. Most of the properties are being or have been foreclosed, forcing HUD to pay off the loan balances, it said.

A year-long probe by the Federal Bureau of Investigation and the HUD inspector general's office led to the filing of charges.