Abidjan, Ivory Coast - U.N. peacekeepers battled attackers trying to enter their compound in Ivory Coast's government-held south Wednesday, leaving at least four dead and 10 wounded in a third day of unrest in the divided nation.

Capt. Gilles Combarieu, a U.N. military observer, said the Bangladeshi troops exchanged fire with gunmen in the government-held town of Guiglo. All U.N. employees later withdrew from the town.

"They had to defend themselves," Combarieu said, adding that 200 to 300 U.N. peacekeepers and staff were moving north toward a more heavily guarded buffer zone separating government and rebel fighters.

Residents reached by telephone in Guiglo, near the Liberia border, said rioters were looting the offices of humanitarian groups.

Combarieu said about 70 U.N. peacekeepers and all other U.N. staff in the nearby town of Douekue also were evacuating after threats of violence.

In the main Ivory Coast city of Abidjan, peacekeepers inside the country's U.N. headquarters fired into the air and launched tear-gas grenades at demonstrators for a second consecutive day Wednesday, keeping about 1,000 protesters at bay, he said.

The West African nation has been on edge since President Laurent Gbagbo canceled planned October elections, blaming rebels who control the north and refuse to disarm.

Afterward, the United Nations and the African Union endorsed a one-year extension of Gbagbo's five-year mandate, which rebels and opposition leaders fiercely opposed.

Gbagbo now leads a one-year government of national unity, but he has diminished executive powers and is supposed to hold elections by October.

The protests and clashes erupted after a U.N.-backed mediation group advised over the weekend that the parliament's expired mandate not be renewed.