Sudan’s president, Omar Hassan al-Bashir, on Thursday threatened a full-blown war against its newly independent neighbor South Sudan, the starkest indication yet that the United States and its allies have been unable to bring stability to this corner of Africa despite years of efforts.

Appearing at a rally in the volatile province of North Kordofan, Bashir vowed to teach South Sudan a “final lesson by force.” A day earlier, he threatened to “liberate” South Sudan from the “insects” that rule it.

It was unclear whether the comments, coming days after South Sudan seized the disputed Heglig oil field near the border, represented a formal declaration of war or were merely intended to persuade the United States, the United Nations and regional powers to force South Sudan to leave the area.

Nevertheless, Bashir’s fiery remarks prompted a torrent of criticism from the United Nations and Washington, which was instrumental in forging a 2005 peace deal that ended a decades-long civil war between the two sides and has spent billions to keep South Sudan stable in a region plagued by terrorism and militant Islam. If war erupts again, the United States and its allies could be drawn into trying to mediate another protracted conflict.

In New York, U.N. Secretary General Ban Ki-moon voiced frustration that the two countries have ignored repeated calls to return to the negotiating table to settle their differences.

“The last thing the people of these two countries need is another war — a war that could claim countless lives, destroy hope and ruin the prospects of peace and stability and prosperity of all Sudanese people,” he said at a news conference.

Ban called on South Sudan to immediately withdraw its forces from the town of Heglig, saying its seizure constituted “an infringement of the sovereignty of Sudan and a clearly illegal act.” He also called on Khartoum to stop shelling and bombing South Sudanese territory and to withdraw its forces from disputed territories.

South Sudanese officials insisted that Khartoum was the aggressor, saying the north had attacked four areas since Wednesday. “We are only defending ourselves,” said Col. Philip Aguer, a spokesman for South Sudan’s military, adding that South Sudanese troops repulsed the northern forces.

The United Nations has been in a state of almost permanent crisis management since South Sudan gained independence in July. In the weeks before that, Sudan invaded the disputed territory of Abyei and launched an offensive against its former military foes in South Kordofan, leading to the displacement of hundreds of thousands of civilians, who face the prospect of starvation.

The U.N. Security Council has been trying to muster a diplomatic response that could persuade the two sides to back down. This week, the United States floated the idea of imposing U.N. sanctions to compel the two parties to step back from the fighting. But confidence in a diplomatic solution appeared to be waning.

On Tuesday, former South African president Thabo Mbeki warned the 15-nation council in a closed-door meeting that the two sides were trapped in the “logic of war” and that it may be “too late to talk” them down from their military confrontation.

South Sudan has demanded that the United Nations deploy a peacekeeping force in the area before it agrees to withdraw, something the world body has refused to do. South Sudanese officials have said that it is only fair that the United Nations, which authorized the deployment of an ongoing Ethiopian peacekeeping mission in Abyei, do the same in Heglig.

(Gene Thorp/The Washington Post)

The United States proposed that the United Nations draw peacekeepers from the Ethiopian force, but the proposal has generated little support in the council.

Princeton Lyman, the U.S. special envoy to Sudan and South Sudan, told reporters in a conference call that he is engaged in intensive diplomatic efforts, involving African leaders and the Security Council, to try to head off a return to violence.

Lyman sought to play down reports that the two sides had returned to war and denied published reports that he had concluded the two sides were already at war.

“Obviously, armed clashes are taking place, and that’s very true and terribly, terribly troublesome,” he said. “But in the discussions I’ve had with — in both Khartoum and Juba — I can say with confidence that virtually everyone I’ve talked to has said, ‘Look, we don’t want to go to all-out war with the other; we need to find a way out.’ ”

An oil-centered conflict

The violence underscores the extent to which oil is at the heart of the dispute. Khartoum, which controls the pipelines that take oil out of South Sudan, depends heavily on oil transit fees. South Sudan, which depends on oil for 98 percent of its revenue, has refused to pay the fees, which it says are exorbitant.

Khartoum responded by seizing oil tankers carrying South Sudanese oil and imposing economic blockades. That prompted South Sudan to shut down its entire oil production in February. That month, Sudan allegedly bombed an oil field in South Sudan that was nine miles from the border.

Since then, oil installations and areas around them are increasingly being targeted militarily. Heglig is the scene of the latest fighting. South Sudan says the Heglig oil field is within its territory, based on borders outlined in 1956 by Britain, Sudan’s former colonizer. Officials say their forces will not leave the oil field until the United Nations or the African Union sends a neutral force to oversee the area.

Although Heglig’s oil reserves are said to be in decline, the field remains Sudan’s largest.

‘It’s going to get worse’

Bashir, who seized power in a 1989 coup and is wanted on war-crimes charges by the International Criminal Court, has vowed to retake the oil field and push on toward Juba, the capital of South Sudan. The capture of Heglig by the South Sudanese “has revived the spirit of jihad and martyrdom among the Sudanese people,” he said at the rally in el-Obaid, North Kordofan’s capital, according to the official Sudan News Agency.

“Heglig is not the end but the beginning,” he added, according to a translation by the Reuters news agency.

Andrew Natsios, who was envoy to Sudan under President George W. Bush, said Thursday, “You are seeing already the worst fighting since 1956, and it’s going to get worse. These are two conventional forces that are battling each other; this is not a guerrilla war.”

The civil war between the Muslim north and the mainly animist and Christian south led to the deaths of 2 million people and displaced millions.

On Thursday, China, the dominant foreign player in Sudan’s oil industry, voiced concern over the tensions and urged both sides to stop fighting. “China has worked hard to ameliorate the problems between the two Sudans, and we will continue to work with the international community at mediation efforts,” Foreign Ministry spokesman Liu Weimin told reporters in Beijing.

Lynch reported from the United Nations.