The United States is attempting to create a new military agreement with Niger that would allow it to remain in the country, weeks after the junta said its presence was no longer justified, two Western officials told The Associated Press Friday.

The officials, who spoke on condition of anonymity due to the sensitivity of the situation, said Washington was actively working on options for a revised deal aimed at retaining its foothold in the West African nation.

Niger is home to a major US airbase, in the city of Agadez, some 920 kilometers (550 miles) from the capital Niamey, using it for manned and unmanned surveillance flights and other operations.

But relations have frayed between Niger and Western countries since mutinous soldiers ousted the country’s democratically elected president in July.

The decision to revise the agreement was seen by one of the officials in an internal cable for State Department officials. It didn’t outline what the terms would be and it’s still unclear if the junta will be receptive to them.

In March, a US delegation travelled to Niger to hold discussions at senior levels to explore whether it was possible to achieve an agreement respecting the concerns of both sides, said a State Department official.

The revised agreement would aim at finding a formula that addressed respective interests and concerns, as maintaining a US presence in the country is essential to ensure the safety of the troops, said one of the officials.

What’s at stake is more than counterterrorism operations, said the official.