Image caption David Cameron met Japanese Prime Minister Shinzo Abe at the G8 summit in June

Thousands of jobs with Japanese firms could be at risk if the UK leaves the EU, the Japanese government has hinted.

In a memo to the British government, Japan said its firms were attracted to the UK because it offered a gateway to the European market.

"If the UK leaves the single market... that is not good news," the Japanese embassy told the Sunday Times.

David Cameron has promised a referendum on EU membership if there is a Tory government after the next election.

The prime minister has committed to renegotiating the UK's relationship with Brussels in the meantime.

'Major role'

In an interview with the BBC's Andrew Marr Show, Mr Cameron said: "What we're trying to achieve is a better settlement in the EU for Britain.

"One that respects the fact that those members of the EU that share the same currency, they're going to have to integrate more, and those countries that aren't in the single currency... need to find a settlement with which they are comfortable."

The government published the first details of an analysis of "what the UK's membership of the EU means for the UK national interest" - called the Balance of Competences Review - on Monday.

As part of the review, foreign governments were invited to make contributions.

In its submission, Japan said it was "committed to making its relationship with the EU stronger than ever before".

It added: "In this context, it expects that the UK will maintain a strong voice and continue to play a major role in the EU.

"The UK, as a champion of free trade, is a reliable partner for Japan. More than 1,300 Japanese companies have invested in the UK, as part of the single market of the EU, and have created 130,000 jobs, more than anywhere else in Europe.

"This fact demonstrates that the advantage of the UK as a gateway to the European market has attracted Japanese investment."

'National destiny'

In a statement to the Sunday Times, the Japanese embassy in London said: "We know some countries decided not to submit comments but as a non-EU nation and major investor in the UK we thought it was appropriate.

"We have taken advantage of this occasion to express our expectations... If the UK leaves the single market, countries investing in the UK and exporting to the EU would have to pay tariffs, and that is not good news."

But Conservative MP Julian Brazier dismissed Japan's concerns.

He told the newspaper: "It's kind of the Japanese to give us guidance on our national destiny but at a time when the eurozone is in a crisis unseen for nearly a century I'm not sure they are well qualified to see the way forward for Britain.

"In deciding on our national interest we may have to disappoint their expectations."