Richard Drew, Associated Press
U.S. Deputy Permanent Representative to the U.N. Michele Sison arrives for the Security Council meeting of the United Nations, Thursday, Feb. 2, 2017.

UNITED NATIONS — Military operations to liberate Iraq from the Islamic State extremist group will be coming to an end "in the rather short foreseeable future," the U.N. envoy for Iraq said Thursday.

Jan Kubis told the U.N. Security Council that "the days of the so-called ISIL are counted," using one of the acronymns for the militant group.

Iraqi forces have pushed IS out of nearly all the cities and towns the group once held in Iraq. Mosul is the last major urban center it holds in that country, and government forces have retaken the eastern half of the city since the operation was officially launched in October.

Kubis said the government's steady progress and successful campaign to retake the eastern part of Mosul "should not conceal that fighting has been and will be a massive challenge, in particular inside the old city in western Mosul."

There have been "many casualties on both military and civilian sides," he said.

The U.N. envoy accused the Islamic State group of deliberately targeting civilians attempting to flee areas it controls, indiscriminately shelling civilians in liberated areas, using civilians as human shields and placing its fighters in and near hospitals and schools.

He said the contingency plan for Mosul developed by the government and humanitarian agencies warned that up to 1 million civilians could be affected in the worst-case scenario. But so far, the impact has been far less than humanitarian agencies feared.

During the campaign in eastern Mosul, nearly 190,000 people were displaced and already 30,000 have returned home, Kubis said, while an estimated 885,000 civilians had remained in areas retaken by the Iraqi military.

When fighting starts in western Mosul, he said, "civilians will be at extreme risk" and humanitarian groups are bracing for possible scenarios including "a possible mass exodus, prolonged siege-like conditions, or a sequenced and managed evacuation by the Iraqi security forces."

Iraq's U.N. Ambassador Mohamed Alhakim said his country's forces are completing preparations for taking over western Mosul.

The government will be launching reconstruction projects in liberated neighborhoods and undertaking de-mining, which will allow displaced people to return home, he said.

Alhakim reiterated Iraq's deep regret at U.S. President Donald Trump's travel ban on seven countries including Iraq, saying it "is not fully in line with our strategic partnership" and comes at a time of "major progress" against IS by Iraqi forces.

"We therefore call upon the U.S. government to review its position," he said. "And in this regard, we assert our determination to enhance the strategic partnership between our two countries and to broaden the possibility for cooperation, particularly in combatting terrorism."

The Security Council expressed support for Iraqi forces, urged all efforts to minimize civilian casualties, and stressed the "urgent need" for the government to promote national reconciliation.

Members strongly condemned abuses by IS and called on Iraq to investigate all rights violations and bring perpetrators to justice. The council also reiterated the need to prevent the movement of IS fighters from Mosul to neighboring Syria.

Kubis stressed to the council that after IS militants are routed, Iraq will need "substantial and sustainable" international support and assistance.

"Any abrupt scaling-down of engagement or support would mean repeating mistakes of the past — mistakes that have had grave consequences for stability and security, well beyond the borders of Iraq, even globally," he warned.