(CNN) -- The United Nations has said it will keep its peacekeepers in Ivory Coast despite a directive ordering them out from the west African nation's disputed president, Laurent Gbagbo.
The U.N. security council joined several other world bodies in calling for Gbagbo to step dow after a contested election, with many world leaders saying Alassane Ouattara won the November runoff.
In a statement Saturday, U.N. Secretary-General Ban Ki-moon said "the international community has spoken with one voice regarding Mr. Gbagbo's attempt to hold onto power," noting statements also from the African Union and Economic Community of West African States.
Yet Gbagbo has remained defiant, and earlier Saturday he ordered all U.N. peacekeeping forces out of the country.
Ban responded by saying the peacekeepers will remain to "monitor and document any human rights violations, incitement to hatred and violence, or attacks on U.N. peacekeepers." Their mission in the Ivory Coast ends December 31, though it could be extended.
Two U.N. military observers were hurt Saturday after being attacked by what Ban called "Young Patriots," according to the statement issued by the Secretary-General.
And overnight Friday, six armed men wearing military uniforms and traveling in a civilian vehicle opened fire on U.N. peacekeepers in Sebroko, according to a statement Saturday on the peacekeeping operation's website. The U.N. troops returned fire. There were no reports of injuries.
Ban reiterated on Saturday that "any attack on U.N. forces will be an attack on the international community and those responsible for these actions will be held accountable."
"There will be consequences for those who have perpetrated or orchestrated any such actions, or (who) do so in the future," Ban said.
The Gbagbo government accuses the U.N. of providing military and logistical support to the ex-rebels, who are backers of Ouattara. In a Friday national television appearance, Ivory Coast Army Col. Gohourou Babri accused the United Nations of transporting armed supporters of Ouattara to various sites around the country to launch attacks.
Babri said four ex-rebels were killed Saturday in an attack by government forces on a camp in Trebissou near the ceasefire line. His claims could not be immediately verified.
And at least nine unarmed protesters in Abidjan, Ivory Coast's largest city, were shot and killed by security forces during demonstrations Thursday, witnesses told Amnesty International. The violence erupted as troops loyal to the incumbent president and supporters of his challenger confronted each other.
Ban said Friday that Gbagbo's efforts to stay in power "cannot be allowed to stand," saying anything other than his removal from office "would make a mockery of democracy."
The country's Independent Electoral Commission said Ouattara won the November 28 presidential runoff, but the country's Constitutional Council invalidated those results and declared Gbagbo the winner.
Several world bodies, including the United Nations and African Union, have declared Ouattara as the winner.
Western governments have stepped up their pressure in recent days on the Gbagbo government. European Union leaders late Friday threatened sanctions against the Ivory Coast, while the United States said it would impose "targeted sanctions" against Gbagbo, his family and associates if the incumbent president does not leave office.
"The results of the election are known. There was a clear winner. There is no other option," Ban said Friday.
Journalist Eric Agnero contributed to this report.