The reconciliation of presidents Yoweri Museveni of Uganda and Rwanda's Paul Kagame in the Angolan capital Luanda on Wednesday came from an unlikely peacemaker.
Joao Lourenco, the 65-year-old Angolan president who has been in power for less than two years, invited President Museveni, 74, in power for 33 years, and President Kagame, 61, in power since 2000, to Luanda to end almost two years of tension between their countries.
The leaders of Uganda and Rwanda signed a pact on Wednesday agreeing to end the ongoing rivalry and re-open the border between the two countries that had been closed for the past six months.
The signing in the Angolan capital Luanda, was witnessed by President Lourenco, Democratic Republic of Congo's President Felix Tshisekedi and Congo's Denis Sassou Nguesso.
"We have agreed on a raft of issues that will be implemented between our two countries, largely meant to improve our security, trade, and political relations. Uganda is fully committed to enforcing this agreement," President Museveni tweeted after the signing.
President Lourenco replaced Jose Eduardo dos Santos, one of Africa's longest serving leaders at the time of his retirement in 2017.
According to Mike Mukula, a senior official in President Museveni's ruling National Resistance Movement and a former minister, the choice of President Lourenco would have come from the African Union.
"President Lourenco is seen to be more neutral; he has got the credentials of a diplomat, he is neither francophone nor anglophone--he speaks Portuguese -- which puts him in a good position," Mr Mukula told The EastAfrican.
President Lourenco, a military general, shares a strong background in the revolutionary struggle with both leaders. It is probably this that has stood him in good stead with the two generals from East Africa.
Mr Mukula said that most of the work was done in the background by emissaries, while Luanda presented the formalities of the deal.
"Both presidents realised there was no need for a showdown; there would be a lot of collateral damage, which would not have been easy to repair," Mr Mukula said.
President Lourenco is making his mark as an international peacemaker. He first invited President Museveni and President Kagame to Luanda in July, and both responded positively.
Neighbouring leaders, President Uhuru Kenyatta of Kenya and John Magufuli of Tanzania, had made earlier efforts to reconcile the two.
Shortly after Rwanda shut its common border with Uganda on February 28, President Kenyatta flew to Kigali, where he offered himself to broker a peaceful resolution of issues with Uganda. He later flew to Entebbe, where he met President Museveni, but nothing came of the meetings.
Tanzania's President Magufuli was approached by Kigali, but that did not yield any results either.
The role of President Tshisekedi cannot be underestimated. He was present at the July meeting as well as the accord signing on Wednesday.
Mr Tshisekedi has surprised many by how quickly he has eased his way from opposition politician to a comfortable position as leader of the DRC.
Last year, he negotiated a deal with former president Joseph Kabila to win a controversial election, and has in under a year shown himself as a key player in the politics beyond his own vast borders.
The fact that some of the disputes between Uganda and Rwanda started in DRC, and that they have accused each other of using the vast territory for their proxy wars, could explain the strategic importance.