Uganda's foreign minister says the presidents of Uganda, Kenya and Rwanda have agreed to build two pipelines across East Africa, one of which would end South Sudan's dependence on Sudan for its oil exports.

Minister Sam Kutesa said the three presidents, who held a joint meeting in Uganda on Tuesday, decided the pipelines were crucial for unity in East Africa, which is experiencing an energy boom sparked by oil and gas discoveries in Kenya, Uganda and Tanzania.

He said one of the pipelines will stretch from South Sudan to Kenya's island town of Lamu and the other from Rwanda to the Kenyan port of Mombasa.

Currently South Sudan can only export its oil through Sudan. But the two countries disagree over transit prices and security issues on their shared border.