The number of cars built in the UK last month rose by 3.5% compared with a year earlier, driven by higher exports.
Just over 157,000 vehicles were made in UK factories in October, according to the Society of Motor Manufacturers and Traders (SMMT).
Production for export increased by 5%.
But output for the domestic market fell by 2.9%, as a result of “lower business and consumer confidence”, combined with “confusion over government’s diesel policies”, the SMMT said.
In Wednesday’s Budget, the chancellor announced that new diesel cars that do not meet latest emissions standards would face a one-off tax increase in April.
The increase will be levied on all diesels that do not meet the Real Driving Emissions Step 2 standards on emissions for the first year of ownership. This is expected to affect most new diesel cars.
The SMMT said 82.1% of UK-built cars were exported last month, the highest proportion this year, “with the bulk going to our biggest trading partner, Europe”.
The number of cars made so far this year is down 1.6% compared with the same period last year at 1.1 million. Production for the home market has fallen 6.8% compared with a 0.1% fall in vehicles for export.
SMMT chief executive Mike Hawes said it was “encouraging” to see positive growth in exports and a “slight increase” in overall output.
“Production for British consumers, however, has continued to fall as domestic demand for new cars decreased for the ninth month this year amidst continued uncertainty over both Brexit and the government’s air quality plans.”
The SMMT also published a new independent production forecast that revised expected UK output for the year as a whole down to 1.73 million, against the 1.8 million previously forecast.
“The latest independent UK forecast report is worrying news for the sector, predicting annual output which is, at best, static compared with last year,” said Mr Hawes.
“The industry needs stability and a clear roadmap for Brexit if we are to encourage investment and arrest the decline in both the market and business confidence.”