The junta in Niger, which seized power in a military coup on July 26, has formed a military alliance with the neighbouring countries of Burkina Faso and Mali.
The rulers of Burkina Faso and Mali also seized power in coups.
The accord allows Mali and Burkina Faso to provide military assistance to Niger in the event of military intervention against the putschists there.
A similar agreement already exists between Burkina Faso and Mali.
Following the July coup in Niger, the Economic Community of West African States (ECOWAS) activated a standby force and threatened violence if the democratically elected President Mohamed Bazoum was not reinstated and constitutional order restored.
Talks between ECOWAS and the Nigerian junta took place previous weekend.
The agreement which was announced also calls for the three countries to take joint action against terrorist groups active in their countries and secure their borders.
For years, the countries in the Sahel region have been threatened by various terrorist militias, some of which have sworn allegiance to Al-Qaeda or the Islamic State.
Under Bazoum, Niger was considered one of the last strategic partners of the West in the fight against the advance of Islamist terrorists in the Sahel.