Ethiopia and Eritrea are now on the brink of fighting each other after a stunning split. Ethiopia last week accused Eritrea of invading its territory. Residents saw truckloads of Eritrean troops crossing the border into Adigrat last weekend. This conflict could lead to the first war between them in decades.

The two nations fought alongside each other during a brutal conflict in Tigray that left hundreds of thousands of people dead just a few years ago. Now they are on the brink of fighting each other.

Ethiopia and Eritrea once made common cause in a war against the Tigray People's Liberation Front, the powerful political party in northern Ethiopia.

Hundreds of thousands of people were killed in bloody battles in Tigray just a few years ago. Human rights groups accused both Ethiopia and Eritrea of committing massacres, sexual assault and ethnic cleansing.

The war ended with a peace deal in 2022. But now, Tigray is at the heart of a new conflict, and this time Ethiopia and Eritrea are on opposing sides.

Ethiopia last week accused Eritrea of invading Ethiopian territory and supporting the People's Liberation Front, which said recently that it wants to topple the federal government. Eritrea has accused Ethiopia of destabilizing the region as it prepares for "long-planned invasion of Eritrea."

The escalation marked a stunning split for the neighboring nations. Prime Minister Abiy Ahmed of Ethiopia won a Nobel Peace Prize in 2019 for brokering a rapprochement with Eritrea, which seceded from Ethiopia after a long war in 1993. Analysts now say a renewed conflict in Tigray could lead to the first war between the two countries in decades, one in which the Ethiopian government could seek to overthrow the Eritrean regime.

Ethiopia is Africa's second most populous nation, with roughly 140 million people. But it is also landlocked and Mr. Abiy has described Red Sea access as a national imperative. Eritrea's Assab Port, which Ethiopia ceded after Eritrean independence, is just 45 miles from Ethiopia's border.

Last month, the liberation front seized from federal forces the airport in Mekelle, the regional capital in Tigray. The Front and its allies in the newly formed Alliance for Survival, also attacked federal forces in towns further south and east. One objective, analysts say, was to sever a crucial highway that runs from Addis Ababa, the capital of Ethiopia, to Djibouti, a small coastal country where the United States, China and France all have military bases.

Residents in Tigray told The New York Times that truckloads of Eritrean troops were seen crossing the border and into the Ethiopian town of Adigrat last weekend. The residents requested anonymity for fear of their safety. Analysts said the troops were likely there to support the liberation front.

Eritrea has not commented directly on the accusations.

Federal forces regained control of the airport in Mekelle earlier this month and swept through other towns in Tigray. Since then, Mr. Abiy's army has been seen advancing north toward the border with Eritrea, witnesses said.

Want to stay updated on what's happening in Eastern Africa and the Middle East? Sign up for Your Places: Global Update, and we'll send our latest coverage to your inbox.

Some analysts said they expected Ethiopian forces to reach the Eritrean border within days, potentially with the aim of targeting the capital, Asmara, or the port at Assab.

"When Ethiopian forces reach the border of Eritrea, this will bring the two forces head-to-head," said Mehari Taddele Maru, a prominent expert on the Horn of Africa and a former senior official at the African Union. "There is a high probability of a war between the two countries that may end in Ethiopian control of Assab and potentially regime change" in Eritrea, he said.

Witnesses in Tigray told The Times that Eritrean forces were seen retreating last week toward the border town of Zalambessa.

In recent public speeches, Mr. Abiy has emphasized Ethiopia's need for Red Sea access, almost as if trying to prepare his nation for a possible conflict. He has also strengthened his country's military in recent years, equipping his forces with sophisticated new drones and missiles.

"Ethiopians and the Ethiopian government never said we intended to kill anyone to get access to the Red Sea," Mr. Abiy said in a speech last week. But, he added: "Accepting Ethiopia's access to the Red Sea is a matter of time."

While Eritrea's military is also highly capable, Ethiopia has the advantage of its size and Asmara's proximity to the Ethiopian border, analysts said.

The emerging conflict comes as the two nations have established powerful foreign alliances. President Isaias Afwerki of Eritrea traveled to Saudi Arabia for talks late last year and also met in Egypt this month with the leaders of Somalia and the Sudanese Armed Forces.

During the meetings, Mr. Isaias reaffirmed the need for territorial integrity in relation to the Nile River. Egypt and Ethiopia are in a dispute over the Grand Ethiopian Renaissance Dam, a huge project built by Mr. Abiy's government that draws on Nile waters. Egypt relies on the Nile for its fresh water and has said the dam could threaten its supply.

Ethiopia has close ties with the United Arab Emirates, Israel and the Rapid Support Forces, the paramilitary group locked in a brutal civil war with the Sudanese Armed Forces. (Both the U.A.E. and Ethiopia have denied supporting the R.S.F.)

The African Union has enlisted a former Nigerian president, Olusegun Obasanjo, as lead negotiator in the conflict. But Eritrea has said it mistrusts the continental body, which is based in Addis Ababa.

That leaves the United States.

This month, the State Department urged both countries to respect each other's "sovereignty and territorial integrity."

"The Horn of Africa cannot sustain another military conflict," it said.

With the United States focused on Iran and Ukraine, the chances of a significant U.S. intervention on the Horn of Africa are slim, but several analysts said that may soon change as the Horn of Africa and its Red Sea coastline have taken on added strategic significance this year.

The Red Sea has taken on added strategic significance this year. After the U.S. and Israel began bombing Iran in February, the government in Tehran closed the Strait of Hormuz, making the Red Sea a critical alternative for global shipping, including energy exports from Saudi Arabia.

Last month, the Treasury Department lifted sanctions imposed on Eritrea's military after the last war in Tigray. The move was seen as an attempt by the Trump administration to improve relations with the country given its Red Sea coastline.

The Iran-backed Houthis, who control much of northern Yemen, declared a blockade on Saudi shipping in the Red Sea in July. They have since attacked vessels and, in a rapid offensive, seized Yemen's Red Sea coast, beating the forces of the Saudi-backed government.

At the same time, the Trump administration appears keen to take advantage of investment opportunities in Ethiopia.

U.S. companies have sought to invest in a new airport in the Ethiopian capital that is projected to be the largest in Africa. Ethiopian Airlines, the biggest airline on the continent, announced recently that it had signed a deal with Boeing to buy 10 large jets. But the U.S. focus on investment in Ethiopia has blunted Washington's capacity to act as a conflict negotiator, said Cameron Hudson, a senior fellow in the Africa Program at the Center for Strategic and International Studies.

"It shows the naiveté of the Trump approach because not everyone is interested in getting rich," he said.

Brian O. Otieno contributed reporting from Nairobi