Neighbouring Rwanda and Uganda agreed a deal on Sunday to swap prisoners to help ease tensions following mutual accusations of spying and political meddling.
Rwanda's President Paul Kagame and Uganda's Yoweri Museveni were once close allies but their relations have turned deeply hostile.
Kigali and Kampala signed a deal in August last year to improve political and economic relations, but progress has since been slow.
In the deal signed on Sunday by Kagame and Museveni in the Angolan capital Luanda, the two sides agreed to "the release of the national citizens of each country."
But the two leaders, who met at a summit hosted by Angolan President Joao Lourenco, and alongside Democratic Republic of Congo President Felix Tshisekedi, pledged to take "steps towards peace, stability, good neighbourliness and restoring mutual trust."