The U.N.'s special envoy to Syria, Geir Pedersen, unexpectedly announced on Thursday he was resigning after almost seven years serving as the organization's top official in the war-torn country.

Pedersen, who has held diplomatic posts for decades for the world body and his native Norway, told the U.N. Security Council that "I have informed the secretary-general of my intention to step down."

"And he has graciously accepted my request," he said.

The 69-year-old diplomat said he would leave his position in the "near future," but did not say when. He said he had intended for a while "to move on for personal reasons" and stayed on because of rapid and major developments in Syria.

Pedersen was appointed as the U.N.'s special envoy to Syria in 2018, seven years into the country's civil war. Amid the chaos, Daesh took over significant parts of the nation. In 2019, the terrorist group lost the last sliver of land its fighters controlled, but sleeper cells linger.