DENVER — A judge decided against sanctioning a Colorado drag racing track Tuesday for violating social distancing rules during a July 4 event but said the track must abide by public health orders to stem the spread of the coronavirus, even if those orders are constantly changing.

The case involving Bandimere Speedway, nestled in the Rocky Mountain foothills near Denver, and the Jefferson County Public Health department pitted government's authority to enforce health orders against the track owners' freedom to conduct business under liberties guaranteed by the U.S. Constitution.

District Judge Tamara Russell's ruling didn't completely satisfy either side. She denied the county's request to issue a permanent restraining order against Bandimere for lapses in social distancing and other protocols the track had agreed to with the county before the July 4 event.

About 7,500 people attended the holiday celebration, one of the mainstays of the 24,000-capacity track's season. A county inspector reported race fans crowded food stands, tents and other areas of the facility, in violation of a pact with Bandimere to keep fans in individual groups of up to 175 people spaced throughout the 160-acre (64-hectare) facility.

But Russell ordered the track to comply with state and county health orders going forward. A new county order requires the track and other businesses planning outdoor activities with gatherings of up to 175 people to submit safety plans before the events are held. A new state order requires mask-wearing in public spaces, among other measures.

The county order applies to events large and small for Bandimere, which runs dozens of events, ranging from the annual Mile-High Nationals drag racing event to weekly "Take It to the Track" nights in which citizens race the drag strip while watched by Colorado State Patrol troopers.

The National Hot Rod Association announced last week that it was canceling the Mile-High Nationals, Bandimere's biggest money-maker of the year, scheduled for August. The NHRA said it didn't have enough time to meet all Colorado pandemic health orders even though it's prepared a 60-page pandemic playbook for its events and has raced in Indianapolis and other venues.

Russell complemented Bandimere's owners for their efforts to stage a safe July 4 event that included posting signs, routing fan traffic and issuing frequent public address announcements on social distancing.

But she cited the testimony of Dr. Mark Johnson, the county health director, on the many unknowns of a pandemic whose victims are increasing in number in Jefferson County.

"Although Bandimere has tons of fans, that's not the public we're looking at. It's the entire public of Jefferson County," the judge said.

Bandimere attorney Randy Corporon had argued previously that the county health orders infringed on his clients' First Amendment rights to freedom of expression and 14th Amendment protections against laws that deprive citizens' liberties. Corporon claimed that the health orders could kill the business that the Bandimere family has run for 62 years.

Russell also cited a 1905 U.S. Supreme Court decision in Jacobson v. Massachusetts that upheld the constitutionality of a compulsory smallpox vaccination law during an outbreak.

"I just sit here scratching my head wondering whether this will end," Corporon said Tuesday of the hundreds of state and county health orders that have been issued during the pandemic.

Russell told Corporon that he could take his argument over the constitutionality of public health orders to an appeals court.

Jefferson County, where the track is located, has experienced an uptick in coronavirus cases, prompting its latest health order.

At least 218 people in the county have died and 3,300 people have been infected. County health department spokeswoman Ashley Sever said epidemiologists cannot definitively connect any increase to the Bandimere July 4 event — though fans attended from throughout the Rocky Mountains region.

For most people, the new coronavirus causes mild or moderate symptoms, such as fever and cough that clear up in two to three weeks. For some, especially older adults and people with existing health problems, it can cause more severe illness, including pneumonia and death.