Electric car pioneer Elon Musk has picked Germany for his new factory because of Brexit, embarrassing Boris Johnson as he prepares to pledge a “clean-energy revolution”.

The prime minister is due to make a televised speech at an electric-car plant in the West Midlands – but the visit risks being overshadowed by Mr Musk’s change of heart.

At an award ceremony in Germany, the entrepreneur announced: “We’ve decided to put the Tesla Gigafactory Europe in the Berlin area.”

And speaking to Auto Express, he blamed Brexit uncertainty for his decision to drop plans to build a research and development base in the UK, which will now also go to Germany.

“Brexit made it too risky to put a Gigafactory in the UK,” Mr Musk said, referring to Tesla’s new battery and electric vehicle plant.

Mr Johnson has claimed investors are ready to unleash development plans in the UK if his Brexit deal is passed – but is facing renewed criticism that it will be a hard Brexit that will deter companies.

To add to the embarrassment, his controversial chief aide Dominic Cummings was captured wearing an “Open AI” T-shirt’ – the Silicon Valley start-up Mr Musk founded – on one of his first days in No 10.

Mr Johnson has faced growing criticism that he has failed to follow through on the landmark legal commitment – enacted in Theresa May’s last days – for net-zero carbon emissions by 2050.

He did announce plans to fund research to develop the world’s first nuclear fusion plant, but most experts believe achieving that dream is still 30 years away.

Best pictures from Final Say Brexit march Show all 76 1 /76 Best pictures from Final Say Brexit march Best pictures from Final Say Brexit march Crowds march through central London Getty Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march Protesters gather in Parliament Square Led By Donkeys Best pictures from Final Say Brexit march Mayor of London Sadiq Khan joins protesters PA Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march Anti-Brexit protesters fill Parliament Square in London PA Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march A demonstrator marches EPA Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march People's Vote Final say march - 19 October 2019 Angela Christofilou Angela Christofilou/The Independent Best pictures from Final Say Brexit march Protesters push a float depicting Dominic Cummings using Boris Johnson as a puppet during the Final Say Brexit march in London PA Best pictures from Final Say Brexit march EU supporters react after the result of the vote on the deal delay was announced at the House of Commons REUTERS Best pictures from Final Say Brexit march A demonstrator carries his dog draped in EU flag AP Best pictures from Final Say Brexit march Thousands of people taking part in a People's Vote march AFP/Getty Best pictures from Final Say Brexit march Protesters use their flags to shelter from the rain Getty Images Best pictures from Final Say Brexit march Protesters march towards Parliament Square Getty Images Best pictures from Final Say Brexit march Anti-Brexit demonstrators carry placards and EU flags AP Best pictures from Final Say Brexit march Sir Oliver Letwin MP in Parliament Square, London, during an an anti-Brexit, Let Us Be Heard rally, after it was announced that the Letwin amendment, which seeks to avoid a no-deal Brexit on October 31, has been accepted PA Best pictures from Final Say Brexit march Thousands of people taking part in a People's Vote march UK BROADCASTERS POOL/AFP via Get Best pictures from Final Say Brexit march A protester with "Bollocks to Brexit" stickers on his head Getty Images Best pictures from Final Say Brexit march Demonstrators march EPA Best pictures from Final Say Brexit march Britain's main opposition Labour Party shadow Secretary of State for Exiting the EU Keir Starmer, shadow Home Secretary Dianne Abbott, shadow Chancellor of the Exchequer John McDonnell, shadow Foreign Secretary Emily Thornberry speaks on stage in Parliament Square AFP via Getty Images Best pictures from Final Say Brexit march Anti-Brexit supporters cheer outside parliament AP Best pictures from Final Say Brexit march A EU supporter waves flags REUTERS Best pictures from Final Say Brexit march Anti-Brexit supporters AP Best pictures from Final Say Brexit march Protesters shout and chant demanding a final say Getty Images Best pictures from Final Say Brexit march Police look towards protesters Getty Images Best pictures from Final Say Brexit march Pro-Brexit protesters outside the Houses of Parliament in London PA Best pictures from Final Say Brexit march People taking part in an Anti-Brexit, Let Us Be Heard march head to Parliament Square in London PA Best pictures from Final Say Brexit march People taking part in an Anti-Brexit, Let Us Be Heard march in Trafalgar Square PA Best pictures from Final Say Brexit march Anti-Brexit supporters cheer outside parliament AP Best pictures from Final Say Brexit march People taking part in an Anti-Brexit, Let Us Be Heard march past Trafalgar Square PA Best pictures from Final Say Brexit march Protesters shout and chant Getty Images Best pictures from Final Say Brexit march Cory (7) sits on his father's shoulders as protesters march towards Parliament Square Getty Best pictures from Final Say Brexit march People attend the 'Together for the Final Say' march EPA Best pictures from Final Say Brexit march Protesters march towards Parliament Square Getty Images Best pictures from Final Say Brexit march Mayor of London Sadiq Khan speaks on stage PA Best pictures from Final Say Brexit march A woman in EU costume EPA Best pictures from Final Say Brexit march Anti-Brexit protesters fill Parliament Square in London PA Best pictures from Final Say Brexit march Anti-Brexit protesters AP Best pictures from Final Say Brexit march Anti-Brexit protesters hold an Independent banner Angela Christofilou/The Independent Best pictures from Final Say Brexit march Protesters hold an anti-Brexit placard by The Independent stall during the Final Say Brexit march in London Tom Richell Best pictures from Final Say Brexit march Anti-Brexit protesters in Parliament Square, London, PA Best pictures from Final Say Brexit march Demonstrators hold placards and EU flags AFP/Getty Best pictures from Final Say Brexit march An anti-Brexit protester joins in the Final Say Brexit march on 19 October AP Best pictures from Final Say Brexit march EU supporters march in London REUTERS Best pictures from Final Say Brexit march Sir Patrick Stewart and Paul McGann join in the Final Say Brexit march in London on 19 October PA Best pictures from Final Say Brexit march EU supporters march Reuters Best pictures from Final Say Brexit march A demonstrator shouts into a megaphone as she marches AFP via Getty Images Best pictures from Final Say Brexit march A dog dressed in an anti-Brexit placard is walked in the Final Say Brexit march in London EPA Best pictures from Final Say Brexit march EU supporters march REUTERS Best pictures from Final Say Brexit march A morris dancer takes part in the Final Say Brexit march in London PA Best pictures from Final Say Brexit march Whippets are dressed in EU flag clothing during the Final Say Brexit march in London AP Best pictures from Final Say Brexit march Protesters march towards parliament in the Final Say Brexit march in London on 19 October 2019 PA Best pictures from Final Say Brexit march An anti-Brexit demonstrator takes part in the Final Say Brexit march in London AFP/Getty Best pictures from Final Say Brexit march EU supporters call on the government to give Britons a vote on the final Brexit deal Reuters Best pictures from Final Say Brexit march Anti-Brexit protesters Angela Christofilou/The Independent Best pictures from Final Say Brexit march An anti-Brexit protester Angela Christofilou/The Independent Best pictures from Final Say Brexit march Anti-Brexit protesters demonstrate in London during the Final Say Brexit march on 19 October AP Best pictures from Final Say Brexit march Protesters push a float depicting Dominic Cummings using Boris Johnson as a puppet during the Final Say Brexit march in London AFP/Getty Best pictures from Final Say Brexit march Protesters march towards parliament from Park Lane in the Final Say Brexit march in London on 19 October 2019 PA Best pictures from Final Say Brexit march Marchers visit The Independent stall during the Final Say March in London Tom Richell Best pictures from Final Say Brexit march An anti-Brexit protester holds a sign calling for a Final Say during a march in London EPA

The Tories have also said they will invest £1bn in the UK’s electric-car industry, but little has been said that could help hit the ambitious 2050 legal target.

Today, Mr Johnson will vow to “harness the power of science, innovation and technology to tackle climate change, spur economic growth and create high-skilled, high-wage jobs”.

The aim is to appeal to Liberal Democrat voters whose support he needs to win a Commons majority and head off the threat of a hung parliament.

Tom Brake, the Lib Dem Brexit spokesperson, seized on Mr Cummings’ admiration of Mr Musk, saying: “The very entrepreneur Cummings idolises has chosen not to invest in the UK because of the extreme Brexit he is pursuing.

Dominic Cummings wearing an Open AI T-shirt (AFP/Getty) (AFP via Getty)

“You really couldn’t make it up. This completely demolishes the Johnson and Cummings Brexit fantasy and shows their deluded plans are already costing us vital investment and making the country poorer.”

Mr Musk wrote on Twitter that his new plant “will build batteries, powertrains & vehicles, starting with Model Y”.

As a major incentive, German officials and auto industry leaders have agreed to increase by half the existing government incentives for electric vehicles, worth €40,000 (£34,000).