THE CRISIS in Libya has obscured another African conflict caused by a strongman’s determination to hang on to power at any cost. In Ivory Coast, a nation of 22 million that was once the most prosperous in West Africa, Laurent Gbagbo has for four months violently contested his loss of a presidential election, at the expense of at least 400 lives and as many as 1 million refugees. Now, at last, he appears close to defeat, as a rebel army closes in on his stronghold in the capital, Abidjan. His last stand could bring still more bloodshed — but his downfall is crucial both to Ivory Coast and to Africa.

The election Mr. Gbagbo lost Nov. 28 to Alassane Ouattara was meant to put an end to years of turmoil in the world’s largest exporter of cocoa — including a civil war between Mr. Gbagbo’s regime and the mostly Muslim north. Though the United Nations pronounced Mr. Ouattara the winner, Mr. Gbagbo refused to vacate the presidential palace. No doubt he hoped that African leaders would induce his challenger to accept the bad “compromise” previously imposed on Kenya and Zimbabwe, whose presidents lost elections and then used violence to remain in office in unworkable unions with the winners.

Another score of elections or referendums is scheduled this year in sub-Saharan Africa. So it was crucial that the African Union, which has pledged itself to democracy, stop this latest coup. To its credit the organization quickly and forcefully rejected Mr. Gbagbo’s claims, laying the groundwork for sanctions by West African nations, the United States and the European Union. On Wednesday the U.N. Security Council unanimously demanded that Mr. Gbagbo step down and ordered further sanctions against him.

The international pressure appears to have played some role in weakening Mr. Gbagbo, who has found it difficult to pay his soldiers after government funds were frozen. Several strong public statements by President Obama may have helped turn some top regime officials; the army commander sought refuge Thursday in the South African Embassy.

But what distinguishes Ivory Coast from Libya, where Mr. Obama is also hoping to use diplomatic and economic pressure to bring about regime change, is the strength of the opposition forces. Mr. Ouattara is supported by a fairly disciplined rebel army — and before it marched on Abidjan, U.N. peacekeeping troops ensured that the president-elect’s compound was not overrun. For those who demanded to know why the United States joined a military intervention to protect Libyans but did not do the same for the people of the Ivory Coast, the answer is fairly straightforward: The latter are far more able to defend themselves.

As the fighting in Abidjan intensified Thursday, the State Department delivered another useful statement warning Mr. Gbagbo that if there is “major violence” in Abidjan because he does not step aside, he and those around him will be held responsible. In the end, the strongman must be pushed out by force if necessary. But once that happens, Mr. Ouattara should be prepared to reach out to Mr. Gbagbo’s supporters, as he has suggested he would do. Stability in Ivory Coast will require not just the end of the Gbagbo regime, but also a concerted process of national reconciliation.