A judge's order that could halt most real estate development in greater Boston until the city's harbor is cleaned up threatens thousands of jobs and more than $2 billion worth of investments in a booming regional economy, development officials said yesterday.

The moratorium on new sewer hookups issued by Superior Court Judge Paul Garrity affects Boston and 42 surrounding communities served by the Metropolitan District Commission, including the high-technology belt lining Rte. 128.

"This kind of thing could throw a wet blanket over the whole economy -- not only investors here, but people from Europe and other parts of the country," said Richard Lundgren of the Greater Boston Real Estate Board.

The judge, saying he would no longer tolerate "a cesspool in our region's frontyard," banned all new sewer connections except for single-family homes. His order came in a 1983 suit and after estimates that two sewage-treatment plants on the harbor that are run by the MDC dumped 1 billion gallons of raw or partially treated sewage in the harbor in the first five months of 1983 during breakdowns and storms.

Attorney General Francis X. Bellotti said he intended to file an appeal Monday to the Massachusetts Supreme Court.