London (AFP) - The invitation for US President Donald Trump to make a state visit to Britain has put Queen Elizabeth II in "a very difficult position", a former top civil servant said Tuesday.

His remarks were made as thousands took to Britain's streets in protest following Trump's decision to ban refugees and citizens of seven mainly Muslim countries.

Peter Ricketts, formerly the top civil servant at the Foreign Office, said the invitation should be downgraded to an official visit to spare the queen further embarrassment.

The proposed visit will be put to a debate by British MPs on February 20, parliament said on Tuesday, after more than 1.6 million people signed a petition demanding the invitation for a state visit be withdrawn.

Ricketts, a member of the House of Lords who also served as national security adviser to former prime minister David Cameron and as ambassador to France, called the invitation "premature" in a letter to The Times newspaper.

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

- 'Protect Her Majesty' -

Such visits involved the queen, who is the head of state, and are seen as the highest expression of friendly ties between two countries.

Official or working visits are less ceremonial and usually do not include royal engagements.

Prime Minister Theresa May announced the state visit during a meeting with Trump at the White House on Friday which was intended to boost trade ties after Britain leaves the EU.

"There is no precedent for a US president paying a state visit to this country in their first year," Ricketts said.

"The government needs to move fast to protect Her Majesty from the growing controversy."

The Times quoted sources close to Buckingham Palace saying that the state visit was going ahead on May's recommendation after a Downing Street spokesman appeared to shift the blame away from her entourage.

Story continues

One source said that royal officials "don't want the queen being dragged into something political".

- 'A virus of misogyny' -

But former foreign minister William Hague, writing in the Daily Telegraph, played down the concerns.

"A queen who has been asked over the decades to host tyrants such as Presidents Mobuto of Zaire and Ceausescu of Romania is going to take a brash billionaire from New York effortlessly in her stride," he wrote.

The controversial visit has sparked a backlash among the public with 1.68 million people signing a petition calling for the trip to be downgraded.

Such petitions must be considered by lawmakers if they attract more than 100,000 signatures, with parliament confirming on Tuesday that MPs will debate the matter next month.

"Parliament will debate this petition on 20 February 2017," said a statement on its petitions website.

The petition reads: "Donald Trump should be allowed to enter the UK in his capacity as head of the US Government, but he should not be invited to make an official State Visit because it would cause embarrassment to Her Majesty the Queen."

A counter petition calling for Trump to proceed with a full state visit also passed the 100,000 threshold, meaning it will be discussed at the same time.

Senior Labour MP Harriet Harman on Tuesday told journalists that May "should take back control and cancel that visit", calling Trump a "virus of misogyny".