In Richmond, city officials recently shelled out $3 million in attorneys' fees and settlement costs to avoid a trial in a hotel zoning case that could have cost the city its entire $280 million annual budget.

In the tiny western Maryland town of Sharpsburg, half of this year's budget was spent to fend off a lawsuit brought by a tire salesman who had accused the town of trying to put him out of business.

"It's a real live horror story," Fairfax County Attorney David T. Stitt said of the lawsuit frenzy unleashed two years ago by a controversial Supreme Court decision that makes local governments liable for violating federal antitrust laws. "It can have a devastating effect on government operation."

In Fairfax County, local officials are so worried about costly antitrust suits that the Board of Supervisors is spending $40,000 on an antitrust audit in an effort to determine where the county is most likely to be sued.

More than 200 antitrust suits have been filed against local governments nationwide since the 1982 Supreme Court ruling in the case of the Community Communications Co. Inc. versus the City of Boulder, Colo. In a 5-to-3 decision, the court ruled that companies or individuals denied cable franchises or trash-hauling rights or other government contracts can go to federal court to challenge a competitor's victory. And the plaintiffs can be awarded the same triple damages as in other antitrust suits.

The decision has unnerved officials of cities, towns and counties across the country like no other recent court action. They complain that the ruling not only paralyzes the ability of some local governments to operate efficiently, but subjects them to unreasonable financial liabilities.

"It is an invitation to loot local government's treasuries," charged one Northern Virginia county official.

But some state officials and business leaders counter that the decision was long overdue. They contend that for years localities have operated outside the laws imposed on private corporations in similar business practices. Until recently, they argue, local governments had a formidable power to destroy or impede legitimate private business activities.

"If some governments weren't violating the antitrust laws, there wouldn't be any issue," said Jan Sagett, legislative counsel for the Washington-based Edison Electric Institute, an association of utility companies that has been an outspoken proponent of the court decision.

In some suits brought since the decison, the awards have been staggering. Last January a judge ordered officials of the small town of Grayslake, Ill., to pay $28.5 million in damages to a developer who was refused permission to connect a sewer line to his new development. The city's annual budget is only $1.4 million.

"The judgment is ridiculous," Mayor Edwin Schroeder said after the judgment was issued. "It could bankrupt a lot of people."

Proponents of the decision say, however, that the ruling may be helping to curtail favoritism and influence-peddling by some local governments in handing out lucrative contracts.

"Under-the-table deals have become a way of life" for some local governments, charges John Shenefield, a Washington antitrust lawyer who frequently speaks on behalf of the court ruling for the National Cable Television Association.

The court ruling came in a suit brought by Community Communications Co. Inc., a cable TV company, that alleged that officials of Boulder restricted competition when they awarded an exclusive cable franchise to one company. The court reasoned that local governments cannot claim blanket immunization on antitrust issues. Such restrictive regulatory action can be taken only with the specific authorization of the state legislature, the court said.

Within months of the Supreme Court ruling, Fairfax County officials obtained just such approval from the Virginia General Assembly to award an exclusive multimillion-dollar cable franchise in the state's most populous county. And last month Warner Cable Co., which began serving Reston 14 years before the county awarded Media General Cable exclusive rights to cable service in Fairfax County, sued county officials under federal antitrust laws.

Warner Cable Co. said in its suit that the county unfairly tried to restrict its business in Reston by refusing to allow it to lay its cable on public property. Fairfax County officials said privately that if Warner is successful the suit could jeopardize the county's massive cable franchise award to Media General.

The Supreme Court ruling reaches far beyond cable television, however. It has touched towing contracts in Arlington County, rent control in California, taxicab operations in New Orleans, redevelopment plans in Richmond and dozens of other areas of government regulation.

Picturesque Charleston, S.C., has dropped plans to establish a historic district to protect aging mansions on the waterfront, fearing antitrust suits from bus companies and other businesses that could be affected by the decision.

"If local officials are so hamstrung that they're afraid to take action, government as we know it will begin to erode," said Fairfax County Supervisor Martha V. Pennino, a Democrat, who has led a national battle against the decision through the National Association of Counties.

Even those officials who said their localities have a strong chance of winning suits said that the cost of defending themselves is high, both politically and financially.

"The political pressures within the community that the suits cause and the time that's spent defending the cases really puts a drain on the city's resources," said William Hefty, city attorney for Richmond. "When the damages can be so high, it puts a lot of pressure on you to settle."

That was the case in Richmond last year, when the Hilton Hotel sued the city for limiting competition. The city refused to allow a Hilton Hotel to be built in one section of town because officials feared that it might siphon business from a Marriott hotel being built in the city's new redevelopment district.

Rather than risk losing a lawsuit that could have equalled the city's $280 million annual budget, officials agreed on a $2 million settlement. The antitrust legal specialists whom the city hired for the case cost an additional $1 million, or 10 times as much as the city usually spends in a year for outside legal counsel.

The impact of the decision has sent hundreds of local officials scurrying to Capitol Hill or state legislatures for relief. Both houses of Congress are considering bills that would limit the financial damages that could be levied against local governments in antitrust cases.

Maryland is one of only a handful of states that immediately examined its regulatory ordinances and quickly enacted legislation giving local governments and some state agencies specific guidelines for operating under the antitrust laws.

"We wanted the communities to use preventative law," said Michael F. Brockmeyer, chief assistant attorney general. But he added that some suits, such as the one against Sharpsburg were filed before the law was enacted.

In many states, the decision has reignited a fierce power struggle between state and local governments. Several states, including Virginia, cling jealously to the state-held power to control the rights of local governments.

"I'm loathe to grant total amnesty to local governments," said Virginia state Sen. Douglas Wilder (D-Richmond) and a 1985 candidate for lieutenant governor. "There have been instances of abuse. I'm cautious about limiting the public's recourse to redress."

Some Virginia legislators said that they expect a deluge of immunity requests from local governments during the next General Assembly, which begins in January. And they expect virtually every one of the bills to spark bitter and prolonged debate.

"We haven't seen the tip of the iceberg yet," said John Rust Jr., a former state legislator now in private law practice in Fairfax County. "The legislature will have a hard time keeping up."

For the past year, local government officials and lawyers have packed seminars in Maryland and Virginia designed to instruct them in how to avoid antitrust suits. At a Seattle convention of the National Association of Counties recently, officials crowded into more than half a dozen lectures on the subject.

"They're scared to death," said Virginia state Sen. Clive L. DuVal (D-Arlington). "Some local officials are going to get sued, and stuck."