Denny Hamlin won a record-setting seventh NASCAR Cup Series at Pocono Raceway on Sunday only to have the victory taken away when his car failed a post-race inspection.

Hamlin and second-place finisher Kyle Busch's Joe Gibbs Racing Toyotas were found to be in violation of rules governing the aerodynamics of their bodies and were both stripped of their finishes.

It was the first time a race winner was disqualified in decades, but not because everyone's been racing clean all these years.

There's an old saying in the NASCAR world that "If you ain't cheating, you ain't tryin'," and teams have always pushed the limits of the rules.

Denny Hamlin Victory Lane

Denny Hamlin celebrated his Pocono win before his car was disqualified. (Logan Riely/Getty Images)

The difference is that, while NASCAR has long given out points penalties and fines to winners whose cars were found to be out of spec, for over a half-century it has been reluctant to disqualify them outright.

KURT BUSCH REVEALS WHAT IT'S LIKE TO DRIVE FOR MICHAEL JORDAN

That changed in 2019 when it decided to crack down on the issue and warned teams that they'd receive the ultimate penalty if their cars weren't up to snuff after the race.

Denny Hamlin and Kyle Busch's Toyotas violated NASCAR Cup Series aerodynamics rules.

Denny Hamlin and Kyle Busch's Toyotas violated NASCAR Cup Series aerodynamics rules. (Rich Graessle/Icon Sportswire via Getty Images)

"We’re changing the culture. We’ve tried to do one way, and it hasn’t worked," said NASCAR COO Steve O’Donnell, who was executive vice president and chief racing development officer at the time.

SHOCK: NASCAR LAUNCHING ELECTRIC RACING SERIES IN 2023, LEAKED DOCUMENTS SAY

Hamlin is the first Cup Series winner to be penalized under the new rules. He has the right to appeal, but will be the first driver since 1960 to have a win taken away from him if the sanction is upheld.

Emmanuel Zervakis

Emanuel Zervakis, shown racing at Daytona, was disqualified after winning at Wilson Speedway in North Carolina in 1960. (ISC Images Archives via Getty Images)

That time, Emanuel Zervakis' Chevrolet was found to have an oversized fuel tank after winning at Wilson Speedway in North Carolina, and the victory was handed to second-place finisher Joe Weatherly, according to Racing Insights.

KURT BUSCH REVEALS WHAT IT'S LIKE TO DRIVE FOR MICHAEL JORDAN

Weatherly had previously been part of the only other first- and second-place disqualification before Hamlin and Busch, when he and Jim Reed were DQ'd for illegal engines.

Glen Dunnaway

Glen Dunnaway, the very first NASCAR Cup Series winner in 1949, was DQ'd after the race. (ISC Images Archives via Getty Images)

Somewhat fittingly, the winner of the very first NASCAR Cup Race, Glen Dunnaway, had his Charlotte Speedway victory revoked because of a rear suspension setup that used "spread" springs, which was something bootleggers did to improve their car's performance, but wasn't allowed in the Strictly Stock series.

CLICK, HERE TO GET THE FOX NEWS APP

Hamlin and Busch have been down this road before as well, just not in the Cup Series.

Busch was DQd after the Truck Series race at Texas Motor Speedway in 2022 for a ride height violation, while Hamlin lost his Xfinity win at Darlington in 2019 for the same reason.