Asked about his remarks on her flight to the US, the PM told journalists that the UK condemns torture and “my view on that won’t change – whether I am talking to you or talking to the president”.

But she said she and Mr Trump could work together, despite their different styles, joking “sometimes, opposites attract”.

In her speech, Mrs May said: “It is in our interests – those of Britain and America together – to stand strong together to defend our values, our interests and the very ideas in which we believe.

Media captionPresident Trump on US-UK trade talks: “I’ll have to handle it myself, which is OK”

“This cannot mean a return to the failed policies of the past. The days of Britain and America intervening in sovereign countries in an attempt to remake the world in our own image are over.

“But nor can we afford to stand idly by when the threat is real and when it is in our own interests to intervene. We must be strong, smart and hard-headed. And we must demonstrate the resolve necessary to stand up for our interests.

“And whether it is the security of Israel in the Middle East or Estonia in the Baltic states, we must always stand up for our friends and allies in democratic countries that find themselves in tough neighbourhoods too,” she said, to applause from her audience.

Significant speech

BBC political editor Laura Kuenssberg said Mrs May was signalling there would be no more wars like those in Iraq and perhaps Afghanistan, and it was significant that she had chosen her US speech to signal such a shift.

BBC diplomatic correspondent James Robbins said it was a hugely significant speech, arguably the biggest by a UK PM in the US since Tony Blair’s 1999 speech in Chicago advocating armed interventionism against dictators – something repudiated by Mrs May.

It followed comments by UK Foreign Secretary Boris Johnson to a House of Lords committee earlier that Bashar Assad should be allowed to run for election to remain in power in Syria – a complete reversal of UK foreign policy.

Do opposites attract?

By Laura Kuenssberg, BBC political editor

As she made her way across the Atlantic, Theresa May joked with the press pack on her flight that “sometimes opposites attract”.

A wisecracking way of trying to cover the question about how she and Donald Trump can work together – the reality TV star billionaire and the self-described hard-working vicar’s daughter.

Voters will decide for themselves how funny they find it.

But Number 10 has already invested a lot in the early days of this relationship.

Mrs May also spoke in support of Nato – which Mr Trump has called “obsolete” and complained that few member states meet their commitments to it – and the Iran nuclear deal which Mr Trump threatened to scrap during his campaign.

And she said care must be taken to distinguish between “extreme and hateful ideology” of Islamist extremism and the “peaceful religion of Islam and the hundreds of millions of its adherents – including millions of our own citizens and those further afield who are so often the first victims of this ideology’s terror”.

On dealing with Russia’s President Putin, she said: “My advice is to engage but beware.”

Mrs May said: “We should not jeopardise the freedoms that President Reagan and Mrs Thatcher brought to Eastern Europe by accepting President Putin’s claim that it is now in his sphere of influence.”

‘Medieval times’

The UK prime minister said she was “delighted” a future US-UK trade deal was being seen as an early priority adding that it “must work for both sides and serve both of our national interests”.

The issue of torture rose up the agenda after the president’s comments to ABC News on Wednesday.

Mr Trump said: “When they’re shooting, when they’re chopping off the heads of our people and other people, when they’re chopping off the heads of people because they happen to be a Christian in the Middle East, when Isis (IS) is doing things that nobody has ever heard of since Medieval times, would I feel strongly about waterboarding?

“I have spoken with people at the highest level of intelligence and I asked them the question, ‘Does it work? Does torture work?’ And the answer was, ‘Yes, absolutely.'”

Present for the president

Image copyrightJeff J MitchellImage caption One of the most famous quaichs, the Waterloo Tree Quaich, which is in the home of great Scottish writer Sir Walter Scott

Theresa May will present Donald Trump, whose mother was born in the Outer Hebrides, with an engraved quaich, a Scottish artefact symbolising friendship.

The shallow bowls were traditionally used in Scotland from the 17th Century as drinking cups.

Mrs May has been urged to reject the comments about torture when she meets President Trump, and she has suggested that British intelligence sharing could be withdrawn from some operations with the US if it reintroduced torture.

‘Inhumane’

Under British law and policy, the UK military and intelligence agencies cannot join operations where someone is being tortured – or officers believe there is a risk that it may happen.

Opposition leader, Labour’s Jeremy Corbyn, said: “Theresa May must stand up for our country’s values when she meets Donald Trump and oppose his support for torture, which is inhumane, illegal and delivers false intelligence.”

Post-Brexit trade opportunities, security and intelligence co-operation and the future of Nato are likely to feature significantly in Mrs May’s talks with Mr Trump.

Although the UK cannot begin to negotiate trade deals with the US or other countries until it leaves the EU, Mr Trump has said he wants a “quick” deal after that happens and the two leaders are expected to discuss future co-operation.