For residents of the Blue Ridge hill country of Loudoun and Clarke Counties, the last two weeks have amounted to a bitter and costly civics lesson.

They learned two weeks ago that state and federal agriculture officials planned to spray 4,700 acres in their area with a powerful pesticide, whose toxic effects are unclear, in an effort to stamp out pesky gypsy moths breeding there.

They banded together, raised more than $1,000, got 1,400 names on a petition opposing the spraying, held rallies, and met with officials. When all else failed, they hired three lawyers, went to Loudoun County Circuit Court, and won an injunction temporarily halting the spraying.

In the end, they lost, State Officials took their case to the Virginia Supreme Court, which dissolved the injunction Thursday. So yesterday morning as the sun rose, two U.S. Department of Agruculture single-engine Cessna planes, led by a third, dumped about 25 pounds of the pesticide, Dimilin W-25, over a 1,680-acre area. Weather prmitting, the planes will return Monday to finish the first round, then come back again in about two weeks for a second.

"We lost because we ran out of money," said Norman Myers, who lives with his wife and 9-month-old son in Hillsboro, just down the road from the spray area.

"If we'd had more money we could have taken them to federal court and won. Still, we didn't do too badly. We had less than two weeks to prepare but we had them running scared."

The Myers family was among about 50 persons who gathered at the Loudoun Courthouse in Leesburg Thursday night. Most were young, many with small children. Despite their farm-style clothing-jeans and work shirts-few were farmers. Many are relative newcomers to the area, escapees from Washington and its suburbs.

An exception was Clyde C. Lamond III, president of Farmers & Merchants National Bank in nearby Hamilton, who wore a suit and tie and spoke with a mountain accent. He had just returned from the court hearing in Richmond.

"They froze us out down there," Lamond said. "We asked after the decision to talk to Carbaugh (Virginia Agriculture Commissioner S. Mason Carbaugh) and we were told from now on to submit any questions or statements in writing."

Lamond owns a small livestock farm in Bluemont, just outside the spray area. He and family-spent Thursday night at home, but covered their garden with grocery bags and boarded up their barn windows to protect against the spray.

Others decided to stay away. Residents estimated two dozen or more families evacuated their homes and moved down with friends or relatives in Leesburg. Another two dozen persons camped out Thursday night on the grounds of Holy Trinity Lutheran Church with the permission of the Rev. J. S. Koiner Jr.

"The church can never turn away people seeking refuge, said Koiner. "If I lived up there, I'd be very scared about that chemical because we don't know enough about it."

The federal Environmental Protection Agency sanctioned the spraying, though EPA officials concede their studies of the pesticide's long-term effects on humans and animals have been "inconclusive." Spokesmen for the National Cancer Institute and the National Institute of Occupational Safety and Health, both of which conduct large-scale testing programs, said yesterday neither agency had reliable test data on the chemical.

Residents obtained copies of the Dimilin warning label, which reads: "Keep (Dimilin) out of lakes, streams, or ponds . . . do not apply on crops or in areas used for food, feed, hay, or pasture."

State agriculture officials have characterized the spray area as forest, but resident says at least 80 families live there, with hundreds more within a few miles and two reservoirs nearby.

"I'm not in the spraying area, but my drinking water is," said Emilie Bost of Round Hill." They say they've covered all the water springs with plastic, but they can't cover the entire watershed or the reservoirs."

Other residents were less fearful. Loudoun Supervisor James Brownell, a dairy farmer whose district includes the spray area and who sits on the state's agriculture advisory board, said he believes the spraying was necessary and thinks most of his neighbors agree.

"All pesticides are hazardous to some degree," said Brownell. "But the real threat here isn't the pesticide but the spread of the gypsy moth." State officials fear the moths, which feast on foliage from hardwood trees, could wreak havoc with Virginia's apple orchards, which constitute a multimillion-dollar industry.

Opposing residents have cited studies by environmentalists contending that federal officials have exaggerated the gypsy moth menace and that the moths might better be controlled by natural parasites rather than by pesticides. They are also upset that officials did not inform them of the spraying until two weeks before it took place, when officials knew of the plans months ahead of time.

Despite their failure, residents talked of more action yesterday. Some wanted to raise more money and seek a federal injunction to stop the second round of spraying. Others said a better, though more long-range, course would be to persuade legislators to pass a new state law assuring adequate notification of future spraying.