President Yoweri Museveni has said the conflict in South Sudan was caused largely by a lack of ideology and the actions of politicians who promote identity politics.
A State House statement released on Tuesday said Museveni made the comments on Monday as he briefed the United States permanent representative to the United Nations, Nikki Haley, on the security situation in South Sudan, Burundi and Somalia.
During the meeting at Uganda House in New York, he acknowledged the importance of identity but observed that it shouldn't compromise the common interest of the people.
"Even Uganda was a failed state but was rescued by a student movement that taught people to forget about identity politics," Museveni said.
South Sudan descended into chaos in 2013 when a political disagreement between President Salva Kiir and his deputy Riek Machar pitted Kiir's Dinka tribesmen in the army against Machar's Nuer.
Efforts to end the subsequent civil strife that has left more than 100,000 people dead, and displaced four million others, suffered a reversal after fresh fighting broke out in July 2015. The fighting scuttled the Igad-mediated peace agreement which had returned Machar as vice president.
Museveni, who is in New York to attend the 72nd session of the United Nations General Assembly, said various factions of the Sudanese People's Liberation Movement have to be brought together - a task he is trying to accomplish alongside Ethiopian prime minister Hailemariam Desalegn.
South Sudan's conflict has forced an average of 1,800 South Sudanese to flee into northern Uganda each day over the past year, according to the UNHCR. The influx has become the fastest growing refugee crisis with more than 85 per cent of the refugees being women and children aged below 18.
Another one million South Sudanese refugees are spread across Sudan, Ethiopia, Kenya, the Democratic Republic of the Congo and Central African Republic.
The statement quotes Haley as having commended Museveni and the government of Uganda for supporting the refugees and spearheading reform efforts in Somalia and South Sudan.
"Uganda has been a good example of what it means to take in refugees. US offers its support as you continue to do that," she said.