The traffic lights near the Leesburg courthouse blinked from green to yellow to red, but nobody cared. It was the 14th August Court Day, the day every year when the town reenacts the festive 18th-century opening of the county's court.

And yesterday, the cordoned four-block area had become an audiovisual salad.

Instead of honking car horns, there was the sonorous blare of a trumpet and the clash of cymbals as members of the City of Fairfax Band, in German village garb, played Bavarian music. Across the stage, children waited for balloons, as a gas pump with its unruly hiss filled the colored spheres of fun.

About 100 feet away, a tall, bearded member of the Maryland Militia, resplendent in colonial breeches, boots and hat, explained to onlookers the intricacies of the "short-land musket." And when he fired his aging gun, 3-year-old Amanda Phillips, of Frederick, her chin streaked with vanilla ice cream, winced as she pressed her palms to her ears.

The loud report fractured the humid Sunday air and the swirl of pungent smoke drifted aimlessly toward the hot dog stand where Kama Krishnamoorthy, a visiting student from Salt Lake City, was wolfing down a sausage sandwich. "I love this," he said. "I am really surprised to realize that I can have lots of fun without going to bars or nightclubs."

"This celebration adds to this really good town," said Mark Schmukler, a 32-year-old engineer from Reston, who with his wife, Pamela, and their 5-month-old bulldog, Ira, had come to the fair for the first time. "It has a wonderful small-town feeling, and we are having a lot of fun."

The sidewalks were thronged with people who spilled over onto the streets to browse among the vendor stands offering a smorgasbord of items. There were calligraphers and florists, watercolor artists and basket weavers, and a stall featuring fuzzy stuffed animals.

In the 18th-century August Court Days, the judges held forth outside the courthouse, and this celebration provided a welcome respite from the summer heat. So as always, one of the main attractions this year was the reenactment of a case, taken from courthouse records.

"This is unique to Loudoun County," said Charlotte Howard, business manager of the Loudoun Times-Mirror, a weekly newspaper established in 1798. The news staff had set up a photography booth to raise funds for Jackie Lindsey, a 2-year-old girl from Lovettsville who needs a bone marrow transplant.

Howard, who has lived in Leesburg for 45 years, said the Court Days have remained largely unchanged. "But the biggest attraction every year is the courthouse drama."

This year, it involved the selection of a duke, and the stilted script generated some laughter from the audience sprawled on the grass. "You'll find very few Virginians who bow down to anybody," thundered "Duke Donaldson," in colored spats and a red knee-length jacket.

The setting on the stage was 18th-century America, but right in front was an anachronistic sign for the "Jefferson Savings and Loan." But such incongruities did not faze Dan Schlueter, a history teacher in Clinton and a member of the Maryland Militia, as he explained the aerodynamics of an Indian ax used in the Revolutionary War. "This is entertainment and education," he said.

The fair, which drew about 20,000 weekenders, is organized by the Loudoun Restoration and Preservation Society, a 17-year-old volunteer group that helps protect the "best of Loudoun County," said Catherine Boyd, president of the society. Proceeds from the fair help finance restoration projects in Leesburg, Boyd said.