LUXEMBOURG (Reuters) - The European Union will consider sending a new security mission to help stabilize Iraq after the expected recapture of Mosul from Islamic State, EU foreign ministers said on Monday.

EU foreign ministers held a first discussion in Luxembourg and agreed to consider the deployment of an EU Security Sector Reform Advice and Assist Team, which could train Iraq security officials, according to a statement released after the meeting.

“I hope this can be put in place rapidly enough, hopefully in the coming months, so we can provide all our advice and assistance to the Iraqi authorities,” EU foreign policy chief Federica Mogherini told a news conference.

Iraq has formally requested EU help, diplomats said.

Iraqi forces are slowly advancing in Islamic State’s last stronghold in the Old City of Mosul. A senior commander of the U.S.-backed Iraqi forces said the assault was the final stage of the ninth-month battle for Mosul.

The EU mission would not take part in the actual combat but would train Iraqi forces, which would help to maintain order after Islamic State is driven out. U.S. officials are concerned tribal groups may fight for control as the militants flee.

French diplomats say an EU mission could build up Iraqi counter-terrorism forces, establish functioning justice and interior ministries and give strategic security advice to the Iraqi government, as well as train police.

Another EU diplomat said the bloc had a duty to help in a non-combat role, partly to avoid even greater flows of refugees to Europe.

While a small step, any such effort could signal an end to France and Germany’s aversion to EU involvement in Middle East wars after the U.S. invasion of Iraq in 2003, which Berlin and Paris opposed.

Both countries are involved separately in the fight against Islamic State militants in Syria and Iraq, but the EU’s militaries have struggled to work as a bloc despite broad know-how in non-combat training roles.

An EU mission in Iraq in 2006 to help train judges and police was widely regarded as a failure because it was too small and too limited in duration, an EU official said.

Mogherini has backed a greater role for the bloc abroad, seeking to develop a common EU defense alliance to match its economic clout.

Any EU mission might dovetail with similar planning at NATO, which this month joined the U.S.-led coalition against Islamic State, and is considering training more Iraqi soldiers.

“We cannot afford to allow a vacuum to develop,” said one EU diplomat briefed on the EU discussions. “We and others are ready to step in. Just how we do that is to be decided.”

The EU’s foreign service, the European External Action Service, is expected to present proposals soon.