Donald Trump will be able to detect Theresa May's desperation for a US-UK trade deal by the hasty offer of a state visit, according to MPs.

Labour's Paul Flynn also compared the US president's behaviour to a "petulant child" as he encouraged ministers to avoid making the mistakes of the past when "very unsavoury characters" have received invitations for state visits.

The Newport West MP led a parliamentary debate on two petitions about the Prime Minister's decision to extend an invitation to Mr Trump.

One petition, with more than 1.85 millions signatures, calls for the visit to be stripped of the trappings of a state occasion in order to avoid causing "embarrassment" to the Queen.

The other, supported by around 312,000 signatories, insists the state visit goes ahead.

The Government, in its official response to the petitions, stressed ministers believed "the President of the United States should be extended the full courtesy of a state visit".

Speaking in Westminster Hall, Mr Flynn said only two US presidents have been offered a state visit since 1952.

SNP MP Alex Salmond, intervening, noted: "The question of the seven-day invitation - would you interpret desperation as the reason?

"And if you're able to see desperation for a trade deal, do you think that President Trump might be able to detect it as well?"

Mr Flynn replied: "The word comes to mind when we think of the circumstances of our beleaguered Prime Minister."

Labour MP Paula Sherriff (Dewsbury) also said of Mr Trump: "To use the expression 'Grab them by the pussy' describes a sexual assault, and therefore suggests he should not be afforded a visit to our Queen."

Conservative Jacob Rees-Mogg (North East Somerset) recalled previous invitations, asking Mr Flynn: "What complaint did you make when Emperor Hirohito came here, who was responsible for the rape of Nanking?"

Mr Flynn replied: "There have been many people here who were less welcome than others. That's absolutely true.

"But we've had people here, very unsavoury characters and not from the United States as it happens.

"But certainly we can't try to imitate the errors of the past. We should set an example of making sure we don't make those mistakes again."

Mr Flynn warned that America is becoming "Orwellian" under Mr Trump, who is presiding over a country where "lies are the truth, good is bad, that war is peace".

He added: "We see this in the figure of the Trump Big Brother, there, ever-present seven days a week, 24 hours a day, preaching from his one source of news - the only voice of truth".

The veteran Labour MP said the public will become even more disillusioned with Parliament if MPs ignore the petition and allow the state visit to go ahead.

He added: "We are in a position unlike any faced by any previous Parliament where we have a person of a unique personality running the United States.

"There are great dangers in attempts to give him the best accolade we can offer anyone - only been offered twice before - of a state visit.

"This would be terribly wrong because it would appear that the British Parliament, the British nation, the British sovereign, is approving of the acts of Donald J Trump,"

His concerns were echoed by Labour MP David Lammy (Tottenham), who said a president who has shown himself to be misogynistic and has the support of white supremacists should not be treated to the pomp and ceremony of a full blown state visit.

He said: "There are many African Americans in American sitting at home in fear, they are concerned about the president who has had the support of the Ku Klux Klan.

"They are concerned about the president that has welcomed white supremacists - it's a term we hoped would almost fall into history - into his close inner circle."

He added: "That Britain should abandon all its principles and afford this man a state visit after seven days - really? Why? Because this great country is so desperate for a trade deal that we would throw all of our own history out of the window?

"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.

"I think this country is greater than that. I think my children deserve better than that. I think my daughter deserves better than that.

"I'm ashamed frankly that it has come to this."

Several Conservative MPs defended the decision to invite Mr Trump and accused MPs opposing it of hypocrisy, pointing out that politicians with poor records in democracy and human rights have been given the honour.

Adam Holloway (Gravesham) said that while Mr Trump's travel ban on seven Muslim-majority countries is absurd, "there is something rather refreshing about a politician actually doing what they said they would do before they were elected".

Nigel Evans (Ribble Valley) compared Mr Trump's election to the Brexit vote, saying that both votes were driven by a feeling among many in the population of being "left behind".

He said: "We have to ask ourselves why is it that people felt so left behind that they made the democratic decisions that they have which we think we can't understand - how could you possibly vote for Brexit? How could you possibly vote for Donald Trump?

"The fact is that the people have. These were the forgotten people. Just like we had the forgotten people in the United Kingdom, there are the forgotten people in the United States of America."

Mr Evans said he does not agree with many of the things Mr Trump has said "but I do respect the fact that he stood on a platform which he is now delivering".

He added: "He is going to go down in history as being roundly condemned as the only politician to deliver on his promises."

Conservative Julian Lewis, chairman of the defence select committee, warned against berating Mr Trump given the importance of the US to preventing World War Three via its Nato links.

He described the alliance as "our best guarantee" of another world war not breaking out in the 21st century, adding: "If you knew that it'd make a significant difference to bringing him on side to continue with the policies that prevented a conflagration on that scale, do you really think it is more important to berate him, castigate him and encourage him to retreat into some sort of bunker rather than to do what the Prime Minister did, perhaps more literally than any of us expected, which is to take him by the hand and try and lead him down the paths of righteousness?

"Because I have no doubt at all about this matter. What really matters to the future of Europe is that transatlantic alliance continues and should prosper.

"There's every prospect of that happening providing we reach out to this inexperienced individual and try and persuade him - and there's every chance of persuading him that he should continue with the policy pursued by his predecessors."

Mr Salmond, in his speech, said: "As an example of fawning subservience... the Prime Minister's holding hands across the ocean visit would be difficult to match.

"To do it in the name of shared values was stomach churning.

"What exactly are the shared values that this House, this country, would hope to have with President Trump?"

The former Scottish first minister said the US president is "not a stupid man", adding it is a "recipe for total and utter disaster" for the UK to advertise its weak position to Mr Trump.

"From my experience of negotiating with Donald Trump, let me tell the honourable member, never ever do it from a weak position because the result will be total disaster."

Conservative James Cartlidge (South Suffolk) said there would be "smiles all round in the Kremlin" if the UK withdrew its offer of a state visit to Mr Trump.

He added he would also make a similar invite to Russian president Vladimir Putin despite aggression from his forces.

Mr Cartlidge said: "Foreign policy for this country is best served by following the national interest, not through gestures or knee-jerk reactions.

"Through calm effective diplomacy in the old-fashioned way, often behind the scenes, and through working towards a long-term strategy rather than something which frankly is redolent of student politics and would be a gesture that would get us nowhere."

Mr Cartlidge said the UK needs to be as close as possible to the US administration so it can raise concerns, adding if the state visit offer is rescinded then the UK will gain nothing.

He said: "I'll tell you who will win - there's one man, and that's Vladimir Putin.

"There will be smiles all round in the Kremlin if we follow this petition because the one thing they want in the Kremlin above all else is to divide the West.

"They want the UK and US divided, they do not want a strong transatlantic partnership - that's not just in our interests but in the global interest.

"We would be crackers to do so.

"Indeed, having said all that, I would offer a state visit to Vladimir Putin - as was done by Tony Blair."

Conservative MP Sir Simon Burns (Chelmsford) said it is a "no brainer" that the invite to Mr Trump should be kept as post-Brexit Britain will need to keep America close.

He said: "What we have got to do is look at what is going to be most helpful for Britain, for its future policy and development, and I think it is a no brainer that working closer with the United States is far more important for this country, particularly as we begin negotiations and the exit from the EU in two, two and a half years' time.

"We cannot afford to be isolated and to ignore our friends."

Fellow Tory Crispin Blunt, chairman of the Foreign Affairs Select Committee, also backed the visit but said it should be delayed until 2020.

He said: "It is incredibly important that our Prime Minister has secured the first voice into the White House of a foreign leader.

"Now the truth is we need to calm this debate and we need to take the hype out of it.... The invitation has been issued, I don't think it could or should be properly rescinded, so there is the possibility that the invitation will be taken up during the course of this year, I think that would be a mistake.

"I think we need to point out that in 2020 we are going to have the 400th anniversary of one of the most remarkable events in British American history, which is the Pilgrim Fathers - incredibly important in the United States - and it will be an utterly appropriate moment to be marked by a state visit."

He said that if the offer of the state visit helped get Mr Trump's pledges for his commitment to the special relationship and Nato, then "that was infinitely the right thing to do".

Labour MP Naz Shah (Bradford West) said that as a Muslim woman she feels personally attacked by Mr Trump's policies.

She said the world looks to America "as leader of the free world" to support the values of equality and human rights, but Mr Trump is peddling divisive rhetoric depicting Muslims as the "enemy within".

"That is me as a Muslim in this House", she said.

"I am not an enemy to Western democracy, I am part of Western democracy. I fought my election really hard, I fought against all those things - the bigotry, the sexism, the patriarchy - to earn my place in this House.

"By allowing Donald Trump a state visit and bringing out the crockery, the china, the red carpet, what we are doing is endorsing all those views, all those things that I fought hard against, and saying 'you know what, it's OK'."

Labour MP Rushanari Ali (Bethnal Green and Bow) said: "It is deeply saddening and shameful that colleagues who are defending this visit are not recognising the serious concern that people have, particularly Muslims, but many others, about the dangers of Donald Trump.

"And it's time they spoke out against that kind of hostility, it is deeply divisive and it's time they addressed this issue instead of making excuses and being apologists for his hatred."