THE TIMING couldn’t have been more appropriate. A week before the Fourth of July, with tourists streaming into the nation’s capital for the annual celebration of American freedoms, a federal appeals court tossed the District’s archaic law requiring tour guides to pass a test. The ruling affirmed the First Amendment right to free speech, and it struck a blow for common sense. D.C. officials would do well to let the opinion stand and not appeal.

In a unanimous June 27 ruling, the U.S. Court of Appeals for the D.C. Circuit overturned a century-old city code requiring all sightseeing tour guides to be licensed at a cost of $200 after correctly answering 70 out of 100 multiple-choice questions. An unlicensed tour guide faced punishment of up to 90 days in jail and/or a fine of up to $300 under regulations the city defended as helping to ensure the safe and fair treatment of tourists.

“What, pray tell, does passing the exam have to do with regulating unscrupulous tour businesses and unethical guides? How does memorization of addresses and other, pettifogging data about the District’s points of interest protect tourists from being swindled or harassed by charlatans,” Judge Janice Rogers Brown wrote in an opinion dismantling the city’s arguments in a suit brought by operators of Segs in the City tours.

There is no question that the city has a stake in safeguarding an industry that brings some 15 million tourists to the city every year and is responsible for more than 66,000 jobs. But sightseeing services are already required to get a license to do business in the city. Market forces, including the proliferation of consumer review Web sites such as Yelp and TripAdvisor, provide an incentive for companies to offer good service. The requirement to pass a test not only discouraged competition but also gave rise to a parasite industry that profited from helping people pass, which in turn had no proven connection to the quality of guiding. It would be far better, as the appeals court suggested, for the city to have regulations aimed at unscruplous practices and a voluntary accreditation system for guides interested in being listed as city-approved. A spokesman for the Department of Consumer and Regulatory Affairs told us that officials are examining the ruling but are also looking at the possibility of narrower regulations.

We understand — and appreciate — the value of a well-informed tour guide who is able to transport visitors to a different time. We value even more highly the right to speak without paying $200 for a license.

Bill Main, (in pink shirt) owner of Segs in the City, gives an introduction on The Washington Monument. (Yue Wu/The Washington Post)