NEW YORK - United Nations special envoy to Iraq Lakhdar Brahimi announced his resignation a few days ago during a UN retreat, diplomatic sources in the world body told Haaretz on Saturday.

Though the UN envoy had not yet filed a resignation letter, the sources said, a replacement for him was already being sought.

UN spokesman Stephane Dujarric said on Saturday that Brahimi did not resign, nor did he threaten to resign, and added that his mission to Iraq has simply ended. According to Dujarric, Brahimi is no longer interested in the mission but will continue to serve as Special Adviser to the Secretary-General on various issues, including Iraq.

According to the report, Brahimi had been frustrated for some weeks, feeling he had been sidelined by the United States in the process of setting up the Iraqi interim government.

Approximately one month ago it seemed that Brahimi was a key figure in shaping Iraq's future. The country's leaders, as well as the Americans, were happy to hear that Secretary General Kofi Annan decided to send him to assist in the transfer of power over to the Iraqi interim government.

Many understood that Brahimi's role was also to assist in making the major appointments in the new government. But the Americans and the Governing Council members close to them were not about to clear the way for the UN envoy.

Iraqi officials were later surprised at the massive pressure the Americans laid on Brahimi, and at his passive attitude toward the pressure. When the new appointments were announced, Brahimi's spokesman expressed concern. "This is not the way we imagined things," he said.

The UN envoy seemed to have been completely taken aback by the way the 23-member Governing Council announced its choice of Iyad Allawi as the country's interim prime minister.

A spokesman for Brahimi had said the envoy would now work with Allawi to form a government.

(Additional reporting by Haaretz Correspondent Yoav Stern.)