Two world records were set Friday night for the most expensive British- and American-made cars ever sold at auction.

Unnamed buyers plunked down $21.8 million and $13.8 million for the cars -- a Jaguar D-Type race car and the first Shelby Cobra ever made. The cars were sold at an RM Sotheby's auction event in Monterey, California. Both prices include auction fees.

The Shelby Cobra that sold was the original car that inspired an iconic line that would become among the most famous and recognizable American performance cars.

Original Shelby Cobras can be very valuable cars -- some have sold for millions of dollars before -- but they aren't usually this pricey.

This one is also special because it was owned by Carroll Shelby himself until his death in 2012.

Related: 15 cool cars for sale at Pebble Beach

In the 1950s, Carroll Shelby had a successful career as a race car driver, but a heart ailment put an end to that. So Shelby turned to building the sports car of his dreams. He was able to build a car in 1962, the Cobra, that could beat General Motors (GENERAL MOTORS)' Chevrolet Corvette on race tracks. He did it by taking the body of a British AC Ace sports car and filling it with a powerful Ford V8 engine. The resulting car, lightweight and shockingly fast, caused an immediate sensation.

The previous record for an American car sold at auction was set by a 1968 Ford GT40 that sold in 2012 for $11 million.

The Jaguar D-Type was a famed racing car known for its enormous vertical fin. The one that sold for a record sum Friday night had won the 1956 LeMans 24-hour endurance race. It had been driven by the Scottish racing ream Ecurie Ecosse.

It is now only the fourth British-made car to ever have been sold at auction for more than $10 million. The previous record for a British car was held by a 1963 Aston Martin DB4 GT Zagato that went for $14.3 million last year.