The US Ambassador to Somalia has given the country’s President a cap with the slogan “Make Somalia Great Again”.

Stephen Schwartz, who was appointed by Barack Obama as the US ambassador to Somalia last July, was pictured handing over the white and blue cap to the newly elected Somali President Mohamed Abdullahi, known as Farmajo.

The cap is clear reference to Donald Trump’s own campaign hat and his motto “Make America Great Again”.

The US mission to Somalia tweeted the picture following a two day meeting between the US ambassador and the Somali President, who was elected on February 8.

Somalia is one of the seven countries named in Mr Trump’s executive order, which aimed to prevent anyone from those Muslim-majority countries from entering the US for 90 days.

Earlier this month President Farmajo spoke out against the ban and said he will work to remove his country from Mr Trump’s list.

There has been confusion over the meaning of the gift and while some social media users thought the gesture was a misstep others said it was out of order.

Laura Hammond tweeted: “The sentiment is ok, but the association with Trump's platform is really unfortunate.”

Mohamed Ali said: ”I hope this is not taken out of context!!”