That Tanzania beat out Kenya to carry Uganda's oil to international markets owes much to economic and security concerns, but also to plans for regional integration.
Plans for a 1,410-kilometre heated pipeline from Hoima in western Uganda to Tanzania's deep water port at Tanga have been chosen to carry Uganda's oil to international markets, over the initially favoured 'northern route' through Kenya.
Heavy lobbying by international oil companies, changes in regional politics and Kenya's fragile security situation seem to be major reasons behind Kampala's change of heart. But by engaging a member long seen as a hindrance to integration efforts, a cross-border project with Tanzania could also help spur the development of the East African Community (EAC).
How the Kenya deal fell through
On 10 August 2015, the presidents of Uganda and Kenya publically agreed to jointly develop a pipeline, depending on Kenya meeting a number of conditions. The choice of the 'northern route' via Hoima-Lokichar-Lamu was portrayed as a contribution towards closer East African integration - a key political goal of Uganda's President Yoweri Museveni.
The proposed pipeline was also politically important for Kenya's government, as it would have helped to justify the huge $25 billion cost of the Lamu Port-South Sudan-Ethiopia Transport Corridor (LAPSSET) development - a flagship project for Kenya's President Uhuru Kenyatta, holding increased significance in a pre-election year.
But progress on the Hoima-Lokichar-Lamu pipeline was contingent on Kenyan guarantees, on the security of the pipeline within Kenya, project financing, swift implementation and low tariffs. Perhaps complacent that the deal had been done, Kenya made slow progress, leaving space for Tanzania, with encouragement from Total, to emphasise the attractiveness of the Tanga route.
The Kenyan government sought to finance the 'northern route' pipeline through a public-private partnership, potentially a slow, complex and expensive mechanism.
In contrast, in March 2016, the Tanzanian presidency claimed that the oil company Total would contribute directly to the Tanga pipeline. Total did not comment publicly on this, but if confirmed, it would make the Tanga financing package significantly cheaper and less risky.
Uganda's foreign affairs minister also highlighted the issue of relative costs of the rival routes. The projected cost of the Tanzania route is approximately $4 billion, up to $1 billion less than going via Kenya.
Kenya's proposed tariff was almost $17 per barrel, compared to Tanzania's $12 per barrel. Uganda's energy minister has also reported that Tanzania has waived land fees, transit charges and taxes associated with the pipeline - if true, this is unlikely to be viable in the long-term.
The development of Kenya's Lamu port is two years behind schedule, while Tanga is already fully operational, vital in the context of avoiding expensive delay to Uganda's ambition to export crude by 2020. Lamu port will require dredging and land reclamation, and community mobilization in Kenya against LAPSSET, primarily through the 'Save Lamu' campaign, may further delay the port's development.
Tanga port's existing infrastructure, including a road and rail network, mitigates these risks. And whereas Kenyan civil society also expressed concern about a pipeline's impact on the country's national parks, the Tanzanian government efforts to promote national development are relatively popular, and Tanga port is already established, meaning that community action over Tanga's further development is far less likely than in Lamu.
Kenya's high-profile problems with insecurity from terrorism and intercommunal violence also played a role in Uganda's decision. The Hoima-Lokichar-Lamu pipeline route would have passed close to restive areas in northern Kenya, a region that shares a porous border with Somalia.
Lamu itself has seen violent attacks by al Shabaab and community tensions centred over land ownership, which have been exacerbated by the port development. Kenya's complex politics over land are heightened along its coast, meaning that land acquisition can take up to a year longer in Kenya than it does in Tanzania - a further factor in favour of pursuing development in Tanga.
The Hoima-Lokichar-Lamu route was also to have included a link to carry South Sudan's oil to Lamu port, but the country's political and security situation makes this unlikely.
With Ethiopia also recently securing a deal with Djibouti to develop a pipeline, the buy-in of Kenya's partners into the LAPSSET project is faltering. President Kenyatta has announced that a 891-kilometre Lokichar-Lamu pipeline will still be developed, but it will be significantly more difficult for Kenya to attract funding for this internal project, projected to cost $2.1 billion.
If construction starts as scheduled in August 2016, the Uganda-Tanzania pipeline is due to be completed by 2020. For Tanzania, this will mark a new vitality in the country's links within East Africa, signalling the country's commitment to a region where it has often been perceived to be dragging its feet. It also marks Tanzania's seriousness about the development of East Africa's hydrocarbon industry - an important factor in the country's own relations with international companies seeking to extract Tanzania's offshore gas.
But Kenya's options are less promising, and none will lend the country the regional clout that was envisaged in its plans to position itself at the heart of East Africa's oil and gas development. Ongoing talks with South Sudan may yet convince the country to halt its oil exports through Sudan and move through Kenya instead, but this is a high-risk scenario given South Sudan's fragility - conflict has stopped the flow of oil before.
Uganda's pipeline deal with Tanzania ultimately demonstrates the mutability of East Africa's regional politics. While there is a shared ambition of strengthening East Africa's economic growth through integrated development, it is clear that each country aims to do this on its own terms.
Research Associate, Africa Programme