Image copyright Getty Images Image caption A state visit could include President Trump staying at Buckingham Palace as a guest of the Queen

Theresa May's decision to invite Donald Trump to a state visit has put the Queen in a "very difficult position", a former head of the Foreign Office says.

Lord Ricketts told the BBC the speed of the invitation had "surprised" him.

A petition calling for the state visit to be cancelled has gathered more than 1.6 million signatures. A rival pro-visit petition has more than 90,000.

On Monday, thousands of people joined UK protests against Mr Trump's travel ban on seven mainly Muslim countries.

The controversial immigration measures prompted an emergency debate in Parliament.

Lord Ricketts, who was permanent secretary at the Foreign Office from 2006 to 2010, said it was unprecedented for a US president to be invited for a state visit in their first year in the White House.

In a letter to the Times, he questioned whether Mr Trump was "specially deserving of this exceptional honour" and described the invitation as "premature".

"It would have been far wiser to wait to see what sort of president he would turn out to be before advising the Queen to invite him.

"Now the Queen is put in a very difficult position," he said.

UK visits by US presidents Richard Nixon: 1969 Visited one month after inauguration; no state visit

Barack Obama: 2009 Visited two months after inauguration; state visit after 28 months

George Bush: 1989 Visited four months after inauguration; no state visit

John F Kennedy: 1961 Visited five months after inauguration; no state visit

George W Bush: 2001 Visited six months after inauguration; state visit after 32 months

Getty Images

Lord Ricketts told BBC Radio Four's Today programme the state visit should be delayed until later in the presidency, and Mr Trump should instead be invited for an official visit this year, "centred mainly on political talks with the prime minister".

He said the Queen would want to receive the president in a "celebratory, warm, friendly visit", but a state visit at the moment would seem "quite controversial".

It got the Queen directly involved with "this early turbulent period of the Trump presidency, when these controversial policies are being announced and so on," he said.

Media playback is unsupported on your device Media caption Trump travel ban: Protesters speak out

No date has yet been announced for the state visit. Such events often include a stay at Buckingham Palace hosted by the Queen.

But Conservative MP Andrew Bridgen said that at a time when MPs were beginning debates over the government's bill to start the Brexit process, "we certainly need that special relationship with the US even more acutely than normal".

"The offer of a free trade deal with the US quickly will be a huge benefit to our negotiations over the next two years as we negotiate our exit from the EU and access to the single market," he said.

Mr Bridgen added that he thought it unlikely that Mr Trump would visit the UK in the next 90 days, by which point "his issues around the travel ban will be resolved one way or another".

Media playback is unsupported on your device Media caption Lord Ricketts tells Today State invitation to President Trump puts Queen in a very "difficult position"

Former Foreign Secretary William Hague said the Queen would take a state visit "in her stride", saying she had in the past hosted "tyrants" such as Romania's former leader, Nicolae Ceausescu, and would cope "effortlessly" with a "brash billionaire from New York".

Writing in the Daily Telegraph, Lord Hague added: "Most of us do not warm to Donald Trump or agree with the policies of his first 10 days.

"We can still, however, believe that our government should be the one he is most likely to listen to, and that Americans of all persuasions are among our closest friends.

"That means that when we ask the president to visit, we don't rescind the invitation."

Media playback is unsupported on your device Media caption What is a state visit? Frankie McCamley explains

Mrs May's office said on Monday she was "very happy" to extend the invitation to Mr Trump on behalf of the Queen.

BBC diplomatic correspondent James Landale said Downing Street was still "standing very firm" on the invitation but there could be flexibility about when Mr Trump visited the UK.

The prime minister has been under growing pressure to say whether or not she was briefed on the US travel restrictions when she met President Trump in Washington last week.

The ban affects citizens from Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen. Critics have called it a "Muslim ban" although the Trump administration denies this.

Foreign Secretary Boris Johnson told MPs on Monday he would not comment on "confidential conversations" between the two leaders.

Mrs May faced heavy criticism when she refused several times to condemn the restrictions when asked during a visit to Turkey.

Downing Street later issued a statement saying she "does not agree" with Mr Trump's travel ban but that US immigration was a matter for the US government.

Image copyright PA Image caption Theresa May's critics want to know if she was briefed on the travel bans while in Washington

But during demonstrations in London on Monday, the crowd chanted slogans including "Shame on May".

Protesters packed Whitehall, causing the closure of Parliament Square. They held banners accusing Mr Trump of Islamophobia and Mrs May of appeasing him.

Demonstrations also took place in Glasgow, Edinburgh, Cardiff, Manchester, Newcastle, Sheffield, Oxford, Cambridge, Brighton, Gloucester, Leeds, York, Liverpool, Leicester and several other towns and cities.

Labour leader Jeremy Corbyn has said Mr Trump should not be welcomed to Britain "while he abuses our shared values with his shameful Muslim ban and attacks on refugees' and women's rights".

Have you or your family been affected by the entry restrictions? Have you been detained at an airport following the travel ban? Share your stories by emailing haveyoursay@bbc.co.uk.

Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: