ABIDJAN, Ivory Coast - The U.N. Security Council extended its peacekeeping mission in Ivory Coast on Monday, hours after the United Nations' top envoy in the West African country said armed men had been threatening staffers in their homes.

Laurent Gbagbo's refusal to concede defeat to opposition leader Alassane Ouattara in last month's election, along with his demand that peacekeepers leave, raised fears that U.N. personnel and other foreigners could be targeted with violence.

Over the weekend, masked gunmen opened fire on the U.N. base, though no one from the agency was injured. Two military observers were hurt in another attack.

"Armed men have been coming to the personal houses of United Nations employees, asking them to leave, and searching their houses under the pretext of looking for arms," U.N. Special Representative Choi Young-jin said.

Toussaint Alain, a spokesman for Gbagbo in Paris, said he doubted soldiers or those supporting Gbagbo would be involved in such tactics.

Gbagbo has ordered the U.N. peacekeeping force to leave Ivory Coast, contending it is biased in favor of Ouattara. The United Nations and the international community recognize Ouattara as the victor of last month's presidential runoff.

The United Nations has refused to leave, and the Security Council resolution adopted unanimously Monday extended the mandate of the 8,650-strong force until June 30.

All stakeholders "will be held accountable for attacks against civilians and peacekeepers and will be brought to justice in accordance with international law and international humanitarian law," said a statement read by U.S. Ambassador Susan Rice, the current council president.

The council extended the temporary deployment of up to 500 additional personnel until March 31, and extended by four weeks the temporary redeployment of three infantry companies and an aviation unit from Liberia to Ivory Coast.

The U.S. State Department Sunday ordered most of its personnel to leave Ivory Coast, the world's top cocoa producer, because of the deteriorating security situation.

About 800 U.N. peacekeepers are protecting the hotel from which Ouattara is trying to govern the country. They are, in turn, encircled by Gbagbo's troops.