Iraqi leaders were all smiles as they welcomed UN Secretary-General Ban Ki-moon, in the wake of provincial elections last Saturday, which gave new legitimacy to the government and strengthened the hand of Prime Minister Nouri al-Maliki.

UN representatives provided technical expertise to Iraq's High Electoral Commission to prepare for the elections, which went off fairly smoothly, in a country where sectarian violence was the norm just a year earlier.

The UN secretary-general underscored the improving security situation, telling President Jalal Talabani that the U.N. would continue to help Iraq recover from its long plight, now that progress is apparent.

"United Nations will continue to stand by, providing necessary assistance, technical and political. But I believe that you have come such a long way but still you have to go a far way to say that you will fully be able to enjoy genuine freedom and security and prosperity. That's what the United Nations is committed to work together with you," he said.

A UN spokesman added that Mr. Ban was making the surprise visit to Baghdad, "to congratulate the Iraqi people on the success of [the] largely violence-free elections."

Fourteen out of 18 Iraqi provinces voted in the election, giving Prime Minister al-Maliki's State of Law coalition 38 percent of the vote in Baghdad, 37 percent in Basrah, and significant margins in other provinces, according to preliminary results.

Iraqi President Jalal Talabani gave his assessment of the situation as he met with the secretary-general.

He said that he painted a picture of the positive developments in Iraq for Mr. Ban, explaining the significance of the elections which were held successfully, in addition to thanking him for the sacrifices the U.N. has made for the Iraqi people.

Prime Minister al-Maliki also thanked Mr. Ban for the UN's role in removing economic and political sanctions which had been imposed on the old Saddam Hussein regime.

He said he thanked the UN for helping to lift all the sanctions imposed on Iraq for the misdeeds of the old (Saddam Hussein) regime against the world and against neighboring states ... and for UN help in carrying out a successful election which proves the Iraqi people have mastered the democratic process, which is the best buttress against the return to dictatorship.

The visit of a UN secretary-general to Iraq is symbolic because it eclipses memories of a brutal, terror attack which destroyed an entire wing of UN headquarters in Baghdad, killing envoy Sergio Vieira de Mello, and other UN employees in August 2003.

It is also the first visit by Mr. Ban to Baghdad since the UN mandate for the multinational force in Iraq expired on Dec. 31. A bilateral security pact between the United States and Iraq went into effect on January 1, allowing American forces to remain in the country until 2011.