Picking a route is vital for oil firms to make final investment decisions on developing reserves found in Uganda and Kenya, which are among a string of hydrocarbon finds on Africa's eastern seaboard. Tanzania has found gas offshore.
Land-locked Uganda, which found oil in a western region around Hoima, said last year it would build a pipeline through Kenya, linking its fields to Kenyan discoveries in Lokichar and on to Lamu on Kenya's north coast. But in March this year Uganda changed tack, saying it was now planning a pipeline from Hoima to Tanga on Tanzania's coast, prompting a last-minute push by Kenya for another switch.
Saturday's summit of the East African Community bloc - which groups Uganda, Kenya, Tanzania, Rwanda and Burundi - in Kampala confirmed Uganda would take the Tanzanian option.
Regarding the crude pipeline, "the summit agreed that two crude oil pipelines, one from Lokichar to Lamu and another from Hoima to Tanga, will be developed by Kenya and Uganda respectively", the final communique said.
"There is no more paralysis on that matter, we are moving," Ugandan President Yoweri Museveni said after the summit meeting.
Kenyan Lands Minister Jacob Kaimenyi said the Uganda and Kenya pipelines would be developed independently.
France's Total, one of the oil firms developing Uganda's fields, had raised security concerns about the Kenyan route. A Kenyan pipeline could at points run near Somalia, from where militants have launched attacks on Kenya.
Britain's Tullow Oil, with stakes in both countries, had backed the Kenyan route, saying it would be cheaper if oil from both pipelines followed the same route.
"While we have always believed that a joint Uganda-Kenya export pipeline was the most cost-effective option, we are clear that both Uganda and Kenya's oil resources can be developed separately," Tullow said in a statement.
The firm said it would now work with both governments on the two pipeline projects.
China's CNOOC is also involved in the Ugandan oil finds.
Projected production start dates from both countries have repeatedly been postponed, particularly because no decision had been taken over the pipeline route.
- Source: Reuters/Kampala