When nations gained independence from colonial powers, the reason why some were able to transition quite peacefully while others were experiencing violence and upheaval was that there were different interest groups in terms of what they wanted from a specific country.
In essence, where nations didn't transit to self-rule peacefully, other nations could have made sure that they would be able to transition peacefully through different ways of helping their fellow neighbouring nations.