Montgomery County Executive Charles W. Gilchrist has told D.C. Mayor Marion Barry that after next month the District can no longer bury its sludge in Montgomery County.

In a recent telephone call to Barry's office, Gilchrist said the county is running out of land that can be used for burying sludge, which is the residue left after processing of sewage. He also said that the county's legal obligation to bury a portion of the District's sludge ended more than a year ago.

William B. Johnson, acting director of the D.C. Environmental Services Division, said he does not know what the city will do with its sludge now that Montgomery has refused to accept it. Sludge disposal has been one of the most difficult environmental problems in the Washington area for years.

"We didn't anticipate this," Johnson said. "This just comes out of the blue. We definitely have to react to this situation and think this one out."

One of the plans that D.C. officials have been considering is to send its sludge by barge and ship to the Caribbean island nation of Haiti, where it would be converted into compost to aid in reforestation.

Area jurisdiction have been burying portions of the District's sludge for the past six years. Montgomery County buries about 45 percent of the sludge produced from the Blue Plains sewage treatment plant, (and nearly half of that is from D.C.) Prince George's and Fairfax counties also bury D.C. sludge. The rest of the city's sludge -- about 55 percent -- goes to a composting plant in the District.

But in July 1978, Federal District Judge John Smith signed a court order saying that Montgomery and Prince George's counties would not have to accept D.C. sludge after Feb. 15, 1979.

Gilchrist has selected three sites north of Germantown for burying the county's share of sludge until 1981 or 1982, when the county will build a sludge composting facility on Rte. 29, one mile from Calverton.