Iraq's defence ministry has said that it has intercepted an al-Qaeda cell working to produce poisonous gas for attacks within the country as well as in Europe and North America.

The group of five men built two facilities in Baghdad to produce sarin and mustard gas, using instructions from another al-Qaeda group, spokesman Mohammed al-Askari said on Saturday.

The members of the cell were preparing to launch attacks domestically, and also had a network to smuggle the toxins to neighbouring countries and to Europe, Canada and the US, Askari said.

He said that the men were planning to spray chemical weapons during the Shia commemoration of the death of Imam Kadhum at a shrine later this week, by using remote controlled toy aeroplanes.

He added that the arrest of the cell members was possible because of cooperation between Iraqi and foreign intelligence services.

In neighbouring Syria, rebel fighters and government forces have accused each other of using nerve gas during the two-year long civil war.

Iraq and Syria share a 600km border, and officials have warned that al-Qaeda-linked Sunni fighters opposed to President Bashar al-Assad and the Shia-led government in Baghdad have set up camp in Iraq's western desert region.

The Islamic State of Iraq, an al-Qaeda's backed group, is still active in the country, launching regular attacks on government and civilian targets.

So far, the group has largely refrained from waging violence outside Iraq, but earlier this year it publicly said it was linked to Syria's Jabhat al-Nusra, a rebel group fighting the Assad regime.