Toyota Motor Corp.’s Lexus brand outsold luxury rivals Mercedes and BMW in the latest quarter as inventory shortages triggered by the pandemic hampered the German brands.

Lexus, which hasn’t won the annual US luxury sales race in a decade, grew 2 percent on the year to 75,285 vehicles in the third quarter. Deliveries at Daimler AG’s premium line declined 9.4 percent to 69,631 units, and BMW AG suffered a 16 percent decline to 69,570. Mercedes is still leading the other two carmakers year-to-date by a wide margin.

Lexus has weathered the pandemic better than its German rivals, with the brand’s best-selling RX SUV seeing strong demand. Both Mercedes and BMW have been hamstrung by tight inventory as the pandemic idled plants in Europe and the United States for weeks. Lexus saw a 31 percent jump in September alone, led by its RX, NX crossover, and ES sedan. That pared declines this year to 13 percent.

“BMW used sales have been very strong — I think it’s eating the new car demand because of the inventory shortage,” said Marc Cohen, vice president at Priority 1 Automotive Group in Maryland, which operates two BMW stores.

BMW dealers adapted by selling customers on vehicles that hadn’t yet arrived on the lot and on off-lease cars. After making do with tight inventory in July and August, BMW had a record month in September as its supply of vehicles was replenished, said Bernhard Kuhnt, president of BMW’s North America business.

“In September, we had for the first time what I’d call better inventory levels,” Kuhnt said by phone. “For the rest of the year I’m cautiously optimistic, but definitely much more optimistic than I was in March.”

Lexus has edged out BMW for the number two spot in year-to-date sales by 2,105 units, but Mercedes