LONDON — With thousands of people demonstrating against President Trump outside Parliament, British lawmakers on Monday debated whether to deny him a formal state visit because — in the eyes of nearly two million Britons in an online petition — it would “cause embarrassment to Her Majesty the queen.”
The debate included the kind of political showmanship and heated language that members of Parliament often do well, with dueling lawmakers invoking Mr. Trump’s impetuousness, his strategic importance to Britain or even his willingness to misrepresent the weather during his inauguration as reasons to cancel or go ahead with the visit.
“The intellectual capacity of the president is protozoan,” said Paul Flynn, an opposition Labour lawmaker who led the argument against a state visit.
In making his case, Mr. Flynn quoted a journalist’s remarks about the disgrace of “pimping out the queen for Donald Trump” — a remark that the Conservative legislator Jacob Rees-Mogg condemned as unworthy, even as a quotation.
Mr. Trump would hardly be the first contentious leader to be honored with a state visit. The queen, acting as always on the recommendation of the government, has in the past received President Robert Mugabe of Zimbabwe, the Romanian dictator Nicolae Ceausescu and President Mobutu Sese Seko, the former leader of Zaire, now the Democratic Republic of Congo. After a recent visit with President Xi Jinping of China, she was caught on camera speaking of how “very rude” the Chinese leader had been.
“A queen who has been asked over the decades to host tyrants such as Presidents Mobutu of Zaire and Ceausescu of Romania is going to take a brash billionaire from New York effortlessly in her stride,” William Hague, a former foreign secretary, wrote in The Daily Telegraph.
Still, the prospect of Mr. Trump’s visit has stirred great passion in Britain. The online petition, backed by 1.8 million people, does not call for Mr. Trump to be barred from Britain altogether, only that his visit be a political one, without the involvement of Queen Elizabeth II.
Another online petition, signed by more than 300,000 people, called for the state visit to take place.
Petitions with more than 100,000 signatures are eligible for parliamentary debate, and any vote would not be binding. The government of Prime Minister Theresa May has been firm in saying that the invitation to Mr. Trump for a full state visit this year will not be withdrawn.
In Parliament, Mr. Flynn cited the need to keep public trust in politicians and noted that no president had ever been invited for a state visit in his first year in office. He also accused Mr. Trump of acting “like a petulant child” and said the queen should not be seen as approving either his actions or his attitudes toward women and Muslims.
But a Conservative legislator, Nigel Evans, said that Mr. Trump was the president of a great ally of Britain and that the critics should “get over it.”
Mr. Trump was fairly elected, he said, adding, “I do respect that he stood on a platform on which he is now delivering.”
Alex Salmond, a legislator from the Scottish National Party, argued that the invitation should be rescinded because members should not confuse respect for the United States with a personal invitation to Mr. Trump.
Traditionally, American presidents must wait several years before getting a state visit, and many do not get one at all.
Mrs. May, after Britain’s vote in June to leave the European Union, was eager to cement good relations with the new American president, and she arranged a rapid visit to Washington. During the visit, she conveyed the invitation, which Mr. Trump accepted.
Leaving the European Union could lock Britain out of the bloc’s single market, a free-trade zone, as well as the customs union, which eliminates tariffs and customs checks. So Mrs. May has seemed eager to shore up her country’s relations with the United States as a counterbalance.
During the debate, a Labour legislator, David Lammy, spoke of Mr. Trump’s attitudes and asked why Britain should “abandon all its principles” and invite him, “because this country is so desperate for a trade deal that we would throw all our own history out the window?”
He said: “We didn’t do this for Kennedy. We didn’t do this for Truman. We didn’t do this for Reagan. But for this man, after seven days, we say, ‘Please come and we will lay on everything because we are so desperate for your company?’” He added, “I am ashamed that it has come to this.”
But James Cartlidge, a Conservative, said that if Britain canceled the visit, “there will be smiles all around in the Kremlin,” which wants to “divide the West.”
And another Conservative, Simon Burns, said that it was important to be “a candid friend” able to influence Mr. Trump and the United States, particularly so given Britain’s plan to leave the European Union.
Various opinion polls indicate that a small majority of Britons support the state visit. But there are also concerns that it would be met with large protests, comparable to 2003, when President George W. Bush made a state visit and many came out to protest the Iraq war.
The mayor of London, Sadiq Khan, supports the petition to disinvite Mr. Trump because of the president’s “ban on people from seven Muslim-majority countries” and his decision to block refugees from entering the United States.
“In those circumstances, we shouldn’t be rolling out the red carpet,” Mr. Khan said on Sunday.
On Monday, the House of Lords began at least two days of debate on a bill, already passed by the House of Commons, to authorize the government to enact Article 50 of the Lisbon Treaty, which would inform the European Union of Britain’s intention to leave the bloc.
The government intends to invoke Article 50 by the end of March, if not sooner, beginning at least two years of negotiations with the other 27 member states on the terms of Britain’s exit and a framework for future relations.