Media playback is unsupported on your device Media caption Nissan's Kevin Fitzpatrick: "We make most of our products for Europe"

Car production in the UK has hit a four-year high and car exports have registered a record high, despite a deep slump in European vehicle sales.

UK factories built 1.46 million cars in 2012, the Society of Motor Manufacturers and Traders said, of which 1.21 million were shipped abroad.

Production was up 9% and exports 8%, despite the fact that separate data on Wednesday showed car sales in the EU hit a 17-year low last year.

The SMMT expects 2013 to be better yet.

"The outlook for 2013 remains positive, with demand in many faster-growing global markets offsetting the continued weakness in European economies," said SMMT head Paul Everitt.

"The £6bn of investment committed to UK facilities, new model programmes and [research and development] signals a bright future and many new opportunities for companies in the supply chain."

Although more than 80% of cars manufactured in the UK are exported, production figures were boosted by strong domestic demand.

Total new car registrations in the UK rose 5.3% in 2012, according to separate data from the SMMT, helping to drive up domestic demand for UK-manufactured cars by 15%.

Of the UK's car exports in 2012, 50% went to other parts of the EU, with another 15% going to the rest of Europe, 16% went to Asia (of which 8% to China) and 13% to the US, the SMMT said.

Media playback is unsupported on your device Media caption Paul Everitt head of the SMMT welcomed the sales figures

Not all the news from the UK was positive.

Production of commercial vehicles, such as trucks and vans, fell 6.8% last year to 112,000 units, due to a slump in both domestic and export demand that accelerated in December.

The production of vehicle engines was tepid, with total output falling 0.3% in the year, largely due to a sharp drop in export demand.