All US soldiers are set to leave Niger, ending their role in the fight against Islamist insurgents.
Washington says it has firmed up plans with the West African nation's military rulers to withdraw its more than 1,000 troops.
The US has also agreed to close down its big drone base near the city of Agadez in the Sahara desert.
Niger is in Africa's Sahel region, which is considered the new global epicentre of the Islamic State group.
The US has relied on Niger as its primary base for monitoring regional jihadist activity.
An American delegation is to head within days to Niger's capital, Niamey, to arrange an orderly withdrawal.
Friday's announcement follow talks in Washington between the US deputy secretary of state, Kurt Campbell, and Niger's Prime Minister Ali Mahaman Lamine Zeine.
It is seen as a blow to US President Biden's administration, which had resisted the move.
The US's $100m (£80m) military base there was built just six years ago, and has played a key role in the US and French strategy to combat jihadists in West Africa.
But Niger's relations soured with both Western countries last year following the coup and the military leaders have sought closer security ties with Russia.
Dozens of Russian military instructors have arrived in Niger in recent weeks, bringing with them a state-of-the-art air defence system, according to state media reports.
Niger has also distanced itself from local democracies and sought stronger regional alliances with fellow junta-led nations Burkina Faso and Mali.
The trio have quit Ecowas - the West African regional body which opposed their military takeovers.
They have also quit the French-backed G5 Sahel force, saying it was ineffectual and undermined African sovereignty, and have launched their own defence pact called the Alliance of Sahel States.