An Alexandria firm with multimillion-dollar contracts to dispose of District of Columbia waste was ordered yesterday to halt construction on a major trash composting facility in king George County, Va.

In a temporary restraining order issued by King George County Circuit Court Judge John A. Jamison, the firm, Dano Resource Recovery Inc., which has contracts with the District of Columbia totaling $27.5 million for disposal of the city's sewage sludge and trash, was told to stop work on the $11 million facility until it has obtained various permits from the state.

The injunction was sought by Virginia Attorney General F. Marshall Coleman, who appeared in court yesterday to present the state's request. Coleman said Dano had not obtained permits from the Board of Health, the Air Pollution Control Board and the State Water Control Board.

If the King George composting project falls through, the District of Colunbia will have lost the only long-range plan it has to dispose of its mounting production of sludge and trash.

Jamison said construction would include earth moving and "site preparation activities." Last month Dano's engineering firm began soil test borings on the site, the 195-acre Chatterton farm, which Dano purchased last month for $495,000. The site is about 50 miles south of Washington.

The composting project, which would involve barging 1,700 tons of sludge and trash daily from D.C. to the Potomac River site, aroused heated citizen opposition among neighborhood residents, and the King George Board of Supervisors revoked Dano's building permits in January. But Dano proceeded with its plans, maintaining that the board's action was illegal.

Judge Jamison's decision requires Dano to halt work immediately, although the company can appeal the temporary restraining order, which expires July 9. Jamison scheduled a hearing April 9 on the permanent injunction sought by Coleman.

The city now is composting its sludge at a newly opened but temporary facility at the Blue Plains regional sewage treatment plant. Even if the temporary facility were kept operating, it would not be able to handle the big increase in sludge production that will occur when Blue Plains goes to advanced treatment next year.