Italian Prime Minister Romano Prodi said Thursday the war in Iraq was a "grave" mistake, but said Italy would remain on the front lines in the war against terror.

"We consider the war and occupation in Iraq a grave error that hasn't solved — but has complicated — the problem of security," Prodi said in his first address to the Senate as prime minister. "Terrorism has found a new base and new excuses for internal and external terrorist action."

Prodi said his government would participate in anti-terror operations if they are sanctioned by international organizations, such as the United Nations.

"We are convinced participants in the war against terrorism, even militarily, when it is legitimized by an international organization to which we belong."

CountryWatch: Italy

As opposition leader, Prodi opposed the war in Iraq and had said during the campaign that the remaining troops would be pulled out "as soon as possible."

The government of former conservative Prime Minister Silvio Berlusconi sent about 3,000 troops to Iraq to help reconstruction after the ouster of Saddam Hussein in 2003, but the move was widely opposed by Italians.

The contingent is being pulled out gradually, and Berlusconi's government had said the withdrawal would be completed by the end of the year.

Prodi did not give a precise timeline Thursday for the withdrawal, saying only it would happen in consultation with Iraqi authorities.

On a different topic, Prodi also vowed to do everything in his power to help make Europe a strong and unified force on the international scene, but was careful not to sideline the United States.

"And also to consolidate and enrich ... the historic alliance with the United States of America," Prodi said.