Media playback is unsupported on your device Media caption Highlights of Barack Obama's interview with the BBC

The UK could take up to 10 years to negotiate trade deals with the US if it leaves the EU, Barack Obama has said.

In a BBC interview, the US president said: "It could be five years from now, 10 years from now before we were able to actually get something done."

Britain would also have less influence globally if it left, he added.

His warning over trade has angered UK campaigners for leaving the EU - with UKIP leader Nigel Farage dismissing Mr Obama's comments as "utter tosh".

Barack Obama exclusive interview in full

Mr Obama has previously said the UK would be at the "back of the queue" for trade deals with the US, if it left the EU.

When asked about the comments, he told the BBC: "The UK would not be able to negotiate something with the United States faster than the EU.

"We wouldn't abandon our efforts to negotiate a trade deal with our largest trading partner, the European market."

He also warned the UK would have "less influence in Europe and as a consequence, less influence globally", if it left the EU.

Media playback is unsupported on your device Media caption Nigel Farage: "Who cares what the US wants? It's what we want that matters"

But Mr Farage told the BBC: "To hear an American president coming to London to threaten us, I don't think goes down very well."

He said other countries including Oman and Australia had been able to negotiate trade deals with the US and the president had been "parroting" Downing Street.

Labour MP Gisela Stuart, who co-chairs Vote Leave, added that it was "extraordinary" the US should urge Britain to remain part of a "dysfunctional organisation".

Tory MP Liam Fox told BBC Radio 4's The World This Weekend: "People in Britain are fairly resistant to messages from outside." Britain's trade relations with the US would be "a matter for the next president, who may not be of his party, anyway".

But Home Secretary Theresa May told the BBC's Andrew Marr Show it was "perfectly reasonable" for the US president to give his views on trade relations between his country, the UK and the EU.

Voters will take his views "on board" and make their own judgements, she said.

Image caption Mrs May said it was "perfectly reasonable" for Mr Obama to give his views

Labour MP Chuka Umunna told Sky Mr Obama's comments "weren't about instructing us... but, as a close ally and friend of the UK, giving a view".

The UK's referendum on whether the country should stay in the EU or leave will take place on 23 June.

Despite criticism from pro-Brexit campaigners, Mr Obama said he thought "ordinary British voters" would be interested in his thoughts on the UK and the EU.

During the wide-ranging BBC interview, he also said:

It would be "a mistake" for any Western state to send ground troops into Syria

Achieving a functioning state in Libya had "enormous ramifications" for Europe

Countries could not "pull up the drawbridge" when faced with the migration crisis

The operation against so-called Islamic State would "slowly shrink" the area they operate in

His wife, Michelle, was a remarkable woman, and on parenting: "I am labour, she's management"

Image copyright AP Image caption The US president played golf with David Cameron on Saturday

Mr Obama was also asked about his priorities for the final nine months of his presidency.

He mentioned implementing the Paris Agreement on climate change, prosecuting the campaign against so-called Islamic State, and concluding a trade agreement with the EU.

'Transatlantic co-operation'

Mr Obama is pushing hard for a proposed Transatlantic Trade and Investment Partnership (TTIP) deal, to cut tariffs and regulatory barriers between the US and EU countries.

Speaking at a news conference with German Chancellor Angela Merkel in Hanover on Sunday, Mr Obama said the US and the European Union should "keep moving forward" with the negotiations.

The BBC's correspondent in Berlin said the main aim of Mr Obama's two-day visit to Germany was to win public support for the planned free trade deal.

The US president's fresh intervention in the EU debate comes as Democratic US presidential hopeful Hillary Clinton also made it clear she thought Britain should remain in the bloc.

Her senior policy adviser Jake Sullivan said: "Hillary Clinton believes that transatlantic co-operation is essential, and that co-operation is strongest when Europe is united."

The Vote Leave campaign said Mrs Clinton's comments were "hollow", but a Downing Street source said "we should listen to our closest friends and allies".