Abiy Ahmed, the newly elected chairman of the Ethiopian Peoples’ Revolutionary Democratic Front, in April.CreditMulugeta Ayene/Associated Press

If nature abhors a vacuum, politics abhors a military standoff, especially between two nations in one of the poorest, most volatile and most strategically sensitive regions of the world.

And so there was much excitement when the government of Ethiopia announced on Tuesday that it would fully accept the ruling of an international tribunal in the country’s boundary dispute with Eritrea — some 16 years after the judgment was issued.

In 2002, a special international commission delineated the border between the two countries, as they had agreed in the peace deal that ended their 1998-2000 war. Demarcation on the ground was expected to start swiftly, allowing cross-border trade and cooperation to resumeBut none of this happened.

Ethiopia accepted the ruling in principle but called for further dialogue and, crucially, kept its troops in place, including in what had been declared Eritrean territory. A few years later, the boundary commission dissolved itself, and in 2008, the United Nations peace monitoring force meant to oversee actual demarcation pulled out, its services unwanted.What once seemed unsustainable — an indefinite state of neither peace nor war — became the norm. Both countries hosted guerrilla groupscommitted to overthrowing the other one’s government. They cynically fought a proxy war in neighboring Somalia. There were repeated flare-ups at their border, triggering apocalyptic predictions that Ethiopia and Eritrea were going to fight again, and next time to the bitter end.

Legally, Ethiopia clearly was in breach, having committed in the 2000 peace deal, like Eritrea, to uphold whatever decision the boundary commission issued. The United Nations, the European Union, the Organization of African Unity (now the African Union) and the United States had pledged to act as guarantors, and so were also in the wrong. Eritrea, for its part, had good reason as a fledgling country to crave international recognition for its borders.But given the choice between a giant traditional ally led by an emollient prime minister and a tiny new-kid-on-the-block with a notoriously prickly president, the major Western powers opted to side with the bigger player — and all the more readily because it cast itself as an ally in the fight against Islamist terrorism.

So what prompted Ethiopia’s announcement this week? Age and sickness is one answer. Over the years, local analysts and former guerrilla fighters have told me that Ethiopia’s dispute with Eritrea was partly being kept alive by animosity between the two countries’ longtime leaders and their immediate entourages.

Years ago, Meles Zenawi and Isaias Afewerki, whose families both hail from the Tigray region that straddles the border, joined the forces of their rebel movements against Ethiopia’s Marxist dictator Mengistu Haile Mariam. They managed to oust him in 1991, paving the way for Eritrea’s formal independence from Ethiopia in 1993 — and then Mr. Meles’s rise to prime minister of Ethiopia and Mr. Isaias’s to president of Eritrea.But rivalry and resentment simmered below the surface. In 1998, a dispute over the nondescript border village of Badme escalated into a war that would kill more than 100,000 people. Many Horn of Africa watchers predicted that relations between the two countries would only normalize once the two leaders quit the scene.

Mr. Isaias, 72, is still at the helm, although only last month he was reported to have left Eritrea for emergency medical treatment in Abu Dhabi. Mr. Meles died in 2012. His immediate successor, Halemariam Desalegn, resigned in February, seemingly overwhelmed by the task of running his discontented nation of some 105 million people. Mr. Halemariam’s fresh replacement, Abiy Ahmed — a spruce 41-year-old with a background in military intelligence — is a man in a hurry.

And with good reason. Ethiopia’s capital, Addis Ababa, may be booming, but so is unrest among a young population that scoffs at official 8-to-10 percent annual growth rates, accuses Mr. Meles’s party — which long dominated the ruling coalition — of ethnic chauvinism and corruption, and chafes at government repression. Foreign exchange reserves are running low; the national debt is climbing. Ethiopia has lived through coups and popular revolutions before, and in recent years the Oromo, who make up the country’s biggest ethnic group but have long been marginalized, have been at the forefront of protests. Appointing Mr. Abiy, an Oromo, as prime minister was a smart survival move; the Ethiopian realized that real change was required.

So have its foreign allies.

In recent years, Western diplomats have grown more and more worried that an increasingly isolated Eritrea, resentful at its treatment by the international community and routinely dubbed a “pariah state” for its domestic human rights record, might come to be seen as an attractive destination by jihadists spilling out of nearby Yemen, Syria and Iraq.

Any such infiltration would be particularly unwelcome given rising geostrategic interest in the Horn of Africa over the last decade and a half. The Red Sea has quietly become one of the world’s most important waterways, with foreign military assets and investment pouring into the region’s ports, railways, airports and roads. Djibouti, landlocked Ethiopia’s de facto outlet to the sea, now hosts troops from the United States and France, but also China, Germany and Japan. The United Arab Emirates’ military operates out of the ports of Assab in Eritrea and Berbera in Somaliland.

For such players, the stalemate between Eritrea and Ethiopia was becoming politically and financially untenable. It is probably no coincidence that Ethiopia’s shift about the boundary this week follows a visit to the region in late April by Donald Yamamoto, the United States’ acting assistant secretary of state for African affairs.