A federal appeals court on Monday refused to reinstate former NASCAR driver Jeremy Mayfield's lawsuit against the sanctioning body over his 2009 suspension for failing a random drug test.

A three-judge panel of the 4th U.S. Circuit Court of Appeals ruled a federal judge did not abuse his discretion in dismissing Mayfield's complaint against NASCAR, its chairman, Brian France; and a drug testing company.

Mayfield sued for defamation, unfair and deceptive trade practices, breach of contract and negligence after France  announced the driver had been suspended for testing positive for methamphetamine. U.S. District Judge Graham Mullen, in Charlotte, N.C., had tossed out the lawsuit because Mayfield had twice signed documents waiving his right to sue, both as a driver and a car owner.

NASCAR hailed the ruling as a vindication of its effort to police the sport against drug use.

"NASCAR is pleased that today the U.S. Court of Appeals for the Fourth Circuit affirmed the U.S. District Court's original decision in May 2010 in Jeremy Mayfield vs. NASCAR," Steve O'Donnell, NASCAR's senior vp for racing operations, said in a statement. "This case was never about anything more than NASCAR's ability to keep the sport clean and our competitors safe."