A West African enclave of farming plateaus and mangrove swamps, Guinea-Bissau was showing signs of emerging from decades of economic malaise when disaster struck this month.

The country had shed its post-colonial Marxist system and begun to attract outside investment and development aid in recent years to relieve staggering poverty that put it among the world's 10 poorest nations.But a failed coup has degenerated into a military standoff in the capital and plunged Guinea-Bissau back into darkness. It also has unleashed fighting elsewhere in a region of complicated enmities and alliances.

Bissau, the capital city of about 300,000 in the nation of about 1 million, is nearly deserted. Downtown blocks are torn by explosions and scarred by bullet holes after two weeks of artillery shelling and ground fighting.

On Saturday, gunfire rattled through the northern outskirts of Bissau as the country's breakaway army leaders held off advancing Senegalese troops near the city's airport, rebel radio and military officials said.

Senegal and the Republic of Guinea both have sent in troops to support the government in its battle against the rebels.

Many of Guinea-Bissau's people are on the move, fleeing for safety and facing the prospect of little food and barely any clean drinking water. Relief workers, unable to reach the capital or other parts of the country, say tens of thousands of refugees are in dire need of assistance.

"The people are sick. They have no shelter, and we still can't help," Jerome Da Sylva, the Red Cross delegate in neighboring Senegal, said Friday.

The United Nations is investigating the growing refugee problem.

The crisis in Guinea-Bissau, which began with an attempt to oust President Joao Bernardo Vieira on June 7, has its roots in the region's failure to find stability since the colonial powers pulled up stakes.

The coup leader, former Brig. Ansumane Mane, is seeking revenge against Vieira for being removed as Guinea-Bissau's army chief of staff for alleged involvement in an arms smuggling scheme.

Some people felt Vieira offered up Mane as a scapegoat to appease Senegal's complaints about smugglers running guns from Guinea-Bissau to rebels in neighboring Casamance, a Senegalese region that is separated from the rest of the country by Gambia.

What Mane hadn't counted on was military intervention by Guinea-Bissau's neighbors.

As a result, he unleashed a chain reaction in the region that now has Guinea-Bissau locked in a deadly conflict that is being used as a proxy for wider historic differences.

The fighting has rekindled fears on both sides about a murky intellectual movement that campaigns to restore a pre-colonial empire covering Guinea-Bissau, Gambia and Casamance, Western diplomats and a local historian said.

The idea, some believe, is for Casamance to win independence from Senegal, after which the three countries would form a new confederation, historian Abdoulaye Bathily said.