A former Navy Seal accused of war crimes in Iraq has met Donald Trump at his Mar-a-Lago resort to thank him for personally intervening to stop military chiefs stripping him of his Trident pin.

Eddie Gallagher reportedly gave the president a gift from his time serving in the Battle of Mosul, when the serviceman allegedly repeatedly stabbed a prisoner of war with a hunting knife before posing for photos with his dead body.

The president's controversial decision to intervene last month was seen as undercutting longstanding conventions about the Pentagon's hierarchy.

Photos posted on Saturday to the Instagram account Mr Gallagher shares with his wife Andrea show the couple smiling alongside Mr Trump and first lady Melania.

“Finally got to thank the President and his amazing wife by giving them a little gift from Eddie's deployment to Mosul,” said the post, which tagged the president and first lady, and used a hashtag to promote Mr Trump’s 2020 election campaign.

Turkey launches offensive into Syria Show all 25 1 /25 Turkey launches offensive into Syria Turkey launches offensive into Syria Turkish soldiers with armored vehicles EPA Turkey launches offensive into Syria A woman flees with her children during Turkish bombardment on Syria's northeastern town of Ras al-Ain AFP/Getty Turkey launches offensive into Syria Smoke billows following Turkish bombardment on Syria's northeastern town of Ras al-Ain in the Hasakeh province along the Turkish border on October 9, 2019. - Turkey launched an assault on Kurdish forces in northern Syria with air strikes and explosions reported along the border. President Recep Tayyip Erdogan announced the start of the attack on Twitter, labelling it "Operation Peace Spring". (Photo by Delil SOULEIMAN / AFP) (Photo by DELIL SOULEIMAN/AFP via Getty Images) DELIL SOULEIMAN AFP/Getty Turkey launches offensive into Syria The first group of Turkish infantry prepare to enter Syria on the border Getty Turkey launches offensive into Syria Civilians flee AFP/Getty Turkey launches offensive into Syria Smoke billows from targets inside Syria AP Turkey launches offensive into Syria Turkish armoured vehicles enter Syria in Akcakale Getty Turkey launches offensive into Syria Civilians leave as smoke rises from Ras al-Ain AFP Turkey launches offensive into Syria A multi-rocket launcher fires in an unknown location Turkish Defence Ministry via Reuters Turkey launches offensive into Syria People wave as Turkish soldiers prepare to cross the border Getty Turkey launches offensive into Syria Girls stand together in Ras al Ain town Reuters Turkey launches offensive into Syria A woman walks as smoke billows following Turkish bombardment in Syria's northeastern town of Ras al-Ain AFP/Getty Turkey launches offensive into Syria A Turkish army's tank drives down from a truck towards the border with Syria AFP/Getty Turkey launches offensive into Syria Turkish jet taxis on tarmac after returning to a military base in southeast Diyarbakir Reuters Turkey launches offensive into Syria A Turkish armored vehicle drives down a road during a military operation in Kurdish areas of northern Syria EPA Turkey launches offensive into Syria People sit on belongings at a back of a truck as they flee Ras al Ain town Reuters Turkey launches offensive into Syria Turkey-backed Syrian opposition fighters enter Tel Abyad AFP/Getty Turkey launches offensive into Syria Civilians flee AFP/Getty Turkey launches offensive into Syria People flee Tal Abyad North Press Agency/Reuters TV Turkey launches offensive into Syria People wave as Turkish soldiers prepare to cross the border into Syria Getty Turkey launches offensive into Syria Civilians flee with their belongings AFP/Getty Turkey launches offensive into Syria Civilians flee during Turkish bombardment on Syria's northeastern town of Ras al-Ain in the Hasakeh province along the Turkish border on October 9, 2019. - Turkey launched a broad assault on Kurdish-controlled areas in northeastern Syria today, with intensive bombardment paving the way for an invasion made possible by the withdrawal of US troops. (Photo by Delil SOULEIMAN / AFP) (Photo by DELIL SOULEIMAN/AFP via Getty Images) DELIL SOULEIMAN AFP/Getty Turkey launches offensive into Syria Turkish President Recep Tayyip Erdogan, right, speaks with Defense Minister Hulusi Akar, left, as they watch the operation by Turkish forces in Kurdish areas EPA Turkey launches offensive into Syria Smoke rises from the Syrian town of Tal Abyad AFP/Getty Turkey launches offensive into Syria Turkey-backed members of Syrian National Army prepare for moving to Turkey with heavy armed vehicles EPA

Mr Gallagher, a chief petty officer, is alleged to have attempted to kill civilians in Iraq as well as killing the Isis prisoner of war.

The purported murder of the Isis militant came during Mr Gallagher's 2017 deployment to Iraq. After allegedly stabbing the man with his hunting knife, he sent a photo of himself to a friend in California, showing him holding the dead victim's head by the hair.

"Good story behind this, got him with my hunting knife," Mr Gallagher wrote in a text message.

Photos posted on Instagram show the two couples meeting on Saturday evening (Instagram)

Months later, in March of 2018, seven members of the Seal's platoon approached their commander to inform him of their colleague's alleged actions — which also included shooting an elderly man and a schoolgirl from a sniper roost.

But, instead of immediately facing an investigation, Mr Gallagher was awarded a Bronze Star for valour by Navy chiefs. He was not arrested until September, after repeated attempts by members of his platoon to convince officials to launch an investigation, according to a detailed report released earlier this year.

In spite of those accusations, Mr Gallagher was ultimately acquitted by a military jury of nearly all the charges he faced. Just one accusation — posing for a photo with a dead captive — stuck, and Mr Gallagher was initially demoted.

A subsequent attempt by top officials in the Navy to strip him of his Trident pin — which would amount to a very strong rebuke for the soldier, and a rescinding of his elite status — was overturned by Mr Trump, marking an unusual intervention by an American president.

In the aftermath of Mr Trump's intervention, defence secretary Mark Esper asked for the resignation of Navy secretary Richard Spencer, claiming that he had lost confidence in him over his handling of the case.

In previous Instagram posts, Mr Gallagher and his wife can be seen attending events hosted by Turning Points USA, a conservative non-profit advocacy group known to be associated with the alt-right and far right.