Thousands of Donald Trump's opponents gathered outside the British parliament on Monday to protest against a planned state visit while lawmakers debated whether the new U.S. president should be given a lavish meeting with Queen Elizabeth.

Britain invited Trump to visit later this year as Prime Minister Theresa May's government seeks to reaffirm the so called "special relationship" with the United States and secure a trade deal as it prepares to leave the European Union.

The planned visit, announced just hours before Trump signed a controversial executive order on immigration, has crystallised opposition in Britain, spurring 1.8 million people to sign a petition saying he should not be afforded the honour of a state visit because it could embarrass the Queen.

As parliament debated that petition on Monday - a symbolic discussion which has no power to force the government to withdraw its invitation - crowds gathered outside with placards bearing slogans such as "Dump Trump, Fight Bigotry".

"It's about the rise of hate and extremism, which is personified by Trump. It's not just about him, but he represents what's happening in the world at the moment," protestor Alison Dale, 61, told Reuters.

"The invitation was kneejerk, and made us look desperate. Now we're leaving the European Union, it's clear we're just desperate for trade deals, and we look weak."

Since taking office in January, Trump has sparked global protests over immigration policies which sought to ban migrants from seven Muslim-majority countries, and from women activists who said his campaign rhetoric and behaviour was misogynistic.

Trump has repeatedly said his immigration orders are aimed at protecting the United States and that his opponents have misrepresented his intentions in an attempt to discredit his administration.

Prime Minister May has made it clear that she will not consider cancelling the visit, but managing the backlash adds to her diplomatic 'to-do' list as she sets about reuniting a country divided over Brexit and negotiating an amicable divorce with European trading partners.

Earlier this month, a spokesman for the White House said Trump was looking forward to visiting "the great people of the UK in the future" and that he "places tremendous value in the special relationship between the United States and the United Kingdom".

SOFT POWER

The debate, hosted in a packed side room of parliament rather than the main debating chamber, gave lawmakers a platform to air their views on Trump.

"It's difficult to know whether to be appalled at the morality of this invitation, or just astonished at the stupidity of the invitation," said Scottish National Party lawmaker Alex Salmond. Previously Trump has clashed with Salmond over his investments in Scotland.

Critics focused on accusations of sexism and referred to his immigration policies, while other lawmakers argued Trump should come to Britain, but should not be given the high honour of a state visit, which would involve lavish displays of royal pageantry and a banquet hosted by Queen Elizabeth.

Some lawmakers argued it was right for Trump to be given the honour of a state visit.

"He is definitively different," said Crispin Blunt, head of parliament's Foreign Affairs committee, who said the visit should be delayed until 2020.

"In an exercise of pressing the right buttons to engage him, I think dangling a state visit in front of a half-Scottish president of the United States whose mother had an immense attachment to the country was a very successful use of the kind of soft power that the United Kingdom has."