A federal appeals court overturned a driver’s alcohol-related conviction Friday and sent a message to anyone caught drinking and driving: If you’re on federal land, it’s a crime to refuse a blood test.

The case involved Sean Harrington, whose parked car was spotted by a Yosemite National Park ranger one night in June 2011 with the lights on and the motor running. The ranger described him as drunk and argumentative. He was arrested and taken to a police station, where, the court said, he refused to submit to a test to determine his blood-alcohol level.

Before locking Harrington up, another ranger read him, three different times, a summary of the California law: that if he refused the test, his license would be suspended for at least a year, and the refusal would also be grounds for criminal prosecution — if he was additionally found guilty of driving under the influence.

No one told Harrington that federal law, which applies in the national park, makes it a crime punishable by up to six months in jail to refuse a blood-alcohol test, even without a DUI conviction.

Harrington pleaded guilty to three federal charges, including possessing marijuana in the car, but prosecutors dropped the DUI charge and took him to trial for refusing the blood test. Convicted of that charge and sentenced to a month in jail and three years of probation on all the counts, he appealed the blood-test charge and won a reversal Friday.

By failing to recite the federal law, the park ranger misled Harrington, who might have agreed to take the blood test if he’d known his refusal was a crime, said the Ninth U.S. Circuit Court of Appeals.

“It was fundamentally unfair to convict Harrington on the refusal charge when he was told time and again that his refusal to submit to a blood-alcohol test was not in itself a crime, even though it was,” said Judge John Noonan in the 3-0 ruling.

The ruling, which might belong on some dashboards, can be viewed here: http://cdn.ca9.uscourts.gov/datastore/opinions/2014/04/18/12-10526.pdf.