Montgomery County officials asked a federal court yesterday to force the Washington Suburban Sanitary Commission to build a controversial sludge composting plant in the county.

"We don't have any more land for trenching sludge," a high county official said. "The state says its a potential health hazard. Our backs are up against the wall."

Montgomery wants to halt trenching -- in which 600 tons of sewage sludge are dumped every day into ditches -- and, as a substitute, start composting, a process by which the wet and smelly material is converted into a crumbly, ordor-free soil conditioner.

But the $15.4 million composting plant, which would be located near Calverton in the Rte. 29 corridor in northeastern Montgomery, cannot be built without approval by the WSSC's six commissioners. Three weeks ago the three commissioners representing Prince George's County refused to join the Montgomery commissioners in approving construction of the plant.

Prince George's officials do not want the plant built so close to their county's borders. Claiming the facility would pose health hazards and generate unacceptable truck traffic, Prince George's has tried to kill the plant while it is still a blueprint.

Meanwhile a caravan of 61 trucks, including 12 tank trailers, hauls 600 tons of sludge every day from the Blue Plains sewage plant in the District to a former farm in western Montgomery near Poolesville.

The trucks pour the sludge into trenches, where it putrefies for years. Every day half an acre of land is lost to potential agricultural production for a decade or more.

"It's silly," said one high county official. "On the one hand, we have an official policy to encourage agriculture in the county, and on the other hand we're using some of the best agricultural land we have as a sludge dump."

The Maryland Health Department has bluntly told Montgomery that the agency "no longer considers (trenching) as a viable means of disposal." Max Risenberg, acting director of the environmental health administration, told the county there is a "potential for groundwater pollution."

Sludge disposal has become a major headache for Montgomery and the rest of the region. As Blue Plains improves its level of sewage treatment, sludge (a residue containing many polutants) piles up.

Blue Plains' present daily output is 1,500 tons but that amount will grow to about 2,200 tons daily if treatment is improved as ordered by the federal government.

In 1978, U.S. District Judge John Lewis Smith Jr. ordered Montgomery to go forward with the Calverton composting facility as the solution to its share of the sludge problem.

Montgomery, through the WSSC, did that. But Prince George's fought the plant, and because it controls half of the WSSC's votes, the sewer agency couldn't appropriate money to build the site.

Yesterday Montgomery played what it hopes is its trump card by asking Judge Smith to order the WSSC to build the composting plant.