A multimillion-dollar deal signed between Emirati maritime giant DP World and Tanzania on Sunday looks set to further entrench the dominance of the United Arab Emirates (UAE) in Africa's freight industry.
Reports of the $250m (£205m) deal first emerged in July, sparking criticism by the opposition that it "violated Tanzania's constitution and endangers national sovereignty".
Activists petitioned a court to halt the deal and were briefly detained for planning anti-government protests.
The high court in Tanzania's south-western town of Mbeya dismissed the petition, paving the way for DP World to manage two-thirds of the Dar es Salaam port for the next 30 years.
Transport Minister Makame Mbarawa - whose office did not respond to earlier requests for comment - said there would be no job losses and that Tanzania would retain 60% of earnings.
DP World says it expects to triple revenue within a decade and speed up the clearance of vessels from the current average of 12 hours to 60 minutes.
Chronic inefficiency, corruption allegations and competition in freight management by neighbouring Kenya are some of the underlying reasons why Tanzania President Samia Suluhu signed off on the agreement.
"People have a right to raise concerns because this is a democracy. And it is the government's job to act," she said during the signing in the administrative capital, Dodoma, downplaying public disquiet.
The UAE is the fourth-largest investor in Africa, after China, Europe and the US. In the last decade, it has invested nearly $60bn in infrastructure and energy sectors across the continent.
DP World - established in 1999 and owned by Emirati ruling families - has increased those inroads with port operations in Angola, Djibouti, Egypt, Morocco, Mozambique, Senegal and Somalia.
In 2021, DP World pledged to invest $1bn in Africa over the next several years.
These investments have at times sparked tensions, tested geopolitical relations and - more crucially - intensified competition for infrastructural development in Africa.
Like China, Turkey and Russia, the UAE is increasingly becoming a political and economic counterweight to the West in Africa.
Abu Dhabi's diplomatic presence has been boosted by humanitarian support and defence cooperation, particularly in the Horn of Africa.
It brokered a peace deal between Eritrea and Ethiopia in 2018, and delivered thousands of tonnes of food aid to Somalia in 2022 amid warnings of a looming famine.
These relationships have given DP World a near monopoly in the Red Sea region, just north of Tanzania. They have also allowed the UAE to consolidate defence interests in the Gulf of Aden as part of an almost decade-long military offensive in Yemen.
As a result, the UAE - despite its size - has an edge over other Gulf nations as the Horn of Africa is a strategic route for crude oil exports.
DP World's developments in Somalia's Bossaso port and Berbera in the self-declared republic of Somaliland amount to almost $1bn. The agreements caused a row with the Somali federal government, which considers Somaliland to be part of its territory and has often had a turbulent relationship with the semi-autonomous Puntland region, which includes Bossaso.
But DP World appears to have shrugged off political pressure to continue operations in both regions.
Its forays in Djibouti - a combination of military real estate and one of the busiest shipping routes in the world - could serve as a cautionary tale.
Djibouti's attempts to seize the Doraleh Container Terminal, its biggest income generator and employer, from DP World triggered an expensive legal battle.
In 2018, Djibouti handed the terminal over to Hong Kong-based China Merchants Port Holdings to protest against a decision by DP World to give neighbouring Ethiopia and Somaliland access to imports.
But the maritime firm, which has a 50-year concession over the port from 2006, argued that the changeover violated its "exclusive access" to the region. The Hong Kong appeals court ordered Djibouti to pay DP World more than $600 million in damages, reasserting its tight grip.
The lengthy lease in Dar es Salaam is not unusual.
The Emirati firm's deals across the continent on the Atlantic coast have been characterised by similarly long-term agreements.
In 2007, DP World edged out French interests in Senegal to win a $1.13bn contract to develop the Ndayane port near the capital, Dakar, which it will control for 25 years.
The firm is set to earn more than $400m over a period of 20 years from a multi-purpose terminal concession agreement with Angola.
Between these developments is the Democratic Republic of Congo's $1.2bn deep-sea port in Banana that will be completed by 2025.
Part of the contention over DP World's presence in Tanzania is the perception that its operations are undermining local rights and management.
DP World Group boss Sultan Ahmed Bin Sulayem said while in Dodoma that the Dar es Salaam port would become a "world-class facility".
President Samia's predecessor, John Magufuli, had long shunned foreign investment and treated international partners with suspicion.
But since taking over in 2021, Mrs Samia has sought various partnerships with the UAE as a means to "address challenges and grab opportunities as quickly as possible".
DP World remains an anchor for the UAE to extend its geopolitical ambitions across Africa.