The US army is pulling out of al-Qaim and two other key military bases in Iraq in the coming weeks.
The decision to leave three of its eight bases in Iraq is a sign the US is looking to dramatically reduce its footprint in the country.
It comes amid heightened tensions with the Iraqi government and Iran.
A ceremony will take place this week at al-Qaim, where the US will formally hand over equipment to the Iraqi army to help it ensure security in the area.
It will end any US presence along the Iraqi side of the border with Syria.
The base is built on the ruins of one of Iraq's oldest train stations, near a tiny town of the same name along the Euphrates river.
The area was the first place in Iraq to fall into the hands of the Islamic State group (IS) in 2014 and one of the last taken back by Iraqi forces in November 2017.
After the victory against IS in the area, Iranian-backed militia groups took control of both sides of the border.
Although Iraqi security forces have also had a presence around al-Qaim, it is now mainly under the control of one of those militia groups, the Popular Mobilisation Forces (PMF),
I have travelled to al-Qaim with US forces twice in the past two years and have witnessed how the atmosphere around the base has gradually changed.
In December 2017, both Iraqi and US flags could be seen flying as US-led coalition and Iraqi forces worked together to fight IS.
At that time, PMF-affiliated groups, especially Kataib Hezbollah and al-Tofof Brigades, both with close ties to Iran's Islamic Revolution Guard Corps (IRGC), were also fighting IS on both sides of the border.
It was an uncomfortable situation for both sides but they had a common enemy to defeat. The Iraqi army acted as a go-between, often co-ordinating parallel operations against IS.
'We will make them leave'
But during my last trip in December 2018, the mood in the area had changed dramatically. Iranian-backed groups had become part of Iraq's official security forces and were gaining power.
That year only one flag was flying at al-Qaim, the Americans had taken control of the base. But outside the base, roads were littered with PMF flags and billboards picturing Iran's supreme leader, a man some PMF groups think of as their religious leader and commander.
US convoys had to pass through PMF-controlled checkpoints to travel to their artillery base on the Syrian border.
But the PMF started to make their opposition to the presence of US troops in Iraq clear, saying they were able to handle any threat from IS alone. Kataib Hezbollah accused the US of attacking its bases near the Syrian border, something the US-led coalition repeatedly denied.
"We will make them leave if they don't want to leave," a Kataib Hezbollah commander who called himself Abu Ameneh told us in an interview at the PMF's headquarters in Baghdad.
The US killing of Iranian commander Qasem Soleimani in Iraq earlier this year further destabilised the fragile dynamic.
Gen Soleimani, the head of the elite force in the IRGC, was killed on 3 January in a US drone attack near Baghdad airport, along with Abu Mahdi al-Muhandis, the deputy commander of Iraq's PMF. It led to a vote in Iraq's parliament to expel all foreign forces, especially the Americans, from the country.
US officials say they have been planning to leave areas like al-Qaim since last year because of the reduced threat from IS but concern for the safety of US and coalition forces has accelerated the move.
Spate of attacks
A senior US defence official told the BBC that the proximity of Kataib Hezbollah to the base was "a key factor within the calculation of the decision to move forces elsewhere".
The US also plans to withdraw from Qayara Airfield West, known as Q-West, and Kirkuk.
Qayara was the base used in the US-backed operation to take back Mosul from IS. Both bases have been hit by rocket attacks in recent months. A US contractor was killed in a rocket attack at Kirkuk on 28 December.
The attack was blamed on Kataib Hezbollah and was followed by US air strikes against the group's headquarters in both Syria and Iraq, which killed 25 people.
At least 25 rocket attacks, unleashing more than 160 individual rockets, have hit US bases in Iraq since October 2019.
Last week, two attacks on the Taji base killed three coalition members, and severely wounded two members of the Iraqi security forces.
However, the retaliatory attack by the US on locations that the Americans say were Kataib Hezbollah ammunition storage facilities killed three Iraqi army personnel, two local police officers and one civilian.
The attacks soured relations between the Americans in Iraq and the country's army, their hosts and original partners in the fight against IS.
In an unusual move, the Iraqi Joint Operation Command, the control centre for all military activity in Iraq, issued a statement blaming both sides but backing up parliament's vote to ask the Americans to leave.
The official number of US troops in Iraq has been estimated at up to 5,200. It is not clear how many troops will be redeployed following the three base closures, as some will be moved to other operational bases within the country.
The future of these remaining troops is not certain. The US hopes its relationship with Iraq's security forces is far from over, but many in Iraq think America has outstayed its welcome.