The imminent end to US tax credits for the purchase of electric cars has brought car manufacturer Tesla a sales record after months of falling numbers.
Deliveries by the company led by Elon Musk rose by 7.4% year-on-year to 497,099 vehicles in the past quarter.
Analysts had expected a decline of around 5% on average.
In each of the first two quarters of the year, Tesla deliveries had fallen by around 13%.
Analysts had already assumed that some prospective buyers in the United States would buy before the $7,500 tax credit expired at the end of September.
However, the majority of them thought that sales were likely to fall nevertheless. The question now is what potentially early purchases will mean for sales in the current quarter and beyond.
Musk had already said that he was expecting some tough quarters ahead.
However, the tech billionaire has long played down the importance of car sales for the company.
The future of Tesla will lie in robotaxis and humanoid robots, Musk has claimed. However, the company is only just starting out in both areas - and is facing a lot of competition.
In total, Tesla built 447,410 cars of all models last quarter, around 4.8% fewer cars than in the previous year.
In the first quarter, the transition phase for the best-selling Model Y was seen as one reason for the decline, alongside the controversies surrounding the political activities of Musk, the chief executive of Tesla.
But even in the second quarter, with stable production of the Model Y, things did not go any better.
Tesla is facing more and more competition from other manufacturers in the electric car business - while the pioneer's model range is hardly changing, at least visually.
In addition, many buyers in the important US market are opting for vehicles with hybrid drives or combustion engines.
Tesla's futuristic-looking Cybertruck electric pickup is not a sales hit either.
In Europe, Tesla is continuing its rapid decline. According to figures from the industry association ACEA, new registrations in the European Union fell by 36.6% year-on-year to 8,220 vehicles in August.
In July, there was a drop of some 42%. Tesla's share of the EU car market has now fallen to 1.2%
Tesla has its European plant in Grünheide near Berlin. The company itself does not provide any information on results in individual regions and countries.