Few people will have expected Donald Trump to conform to all protocols during his first official visit to Britain – but he nevertheless raised eyebrows when he twice broke with etiquette within minutes of meeting the Queen at Windsor Castle.

The US president was condemned on social media for walking in front of the Queen as they inspected a guard of honour of the Coldstream Guards.

She was left having to decide which side of him to go as she caught up to walk alongside him.

Earlier, Mr Trump and Melania, the first lady, defied protocol when they greeted the Queen: Mr Trump failed to bow and Ms Trump did not curtsy, instead simply shaking hands.

Bowing and curtsying is not obligatory but is widely considered good manners and practised by nearly everyone meeting the Queen.

The US president and first lady smiled for photographs with the Queen at Windsor Castle (PA)

The Trumps’ greeting – seen by millions on television worldwide – was in contrast with Theresa May’s deep curtsy last month when she greeted Prince William at an event in Nottinghamshire.

The prime minister performed a strikingly low dip as she shook the Duke of Cambridge’s hand.

A royal family spokesperson said while the general courtesy was to “curtsy or bow” before a member of the royal family, particularly the Queen, this was completely down to “personal choice”.

The monarchy’s official guidance online says there are no obligatory codes of behaviour when meeting the Queen or a member of the royal family, but many people wish to observe traditional forms.

“For men this is a neck bow (from the head only) whilst women do a small curtsy. Other people prefer simply to shake hands in the usual way,” the website says.