Baghdad (AFP) - Iraqi Prime Minister Haider al-Abadi on Thursday offered an amnesty covering security forces members who fled the Islamic State jihadist group, provided they return to their units within 30 days.

Multiple Iraqi divisions collapsed when an IS-led offensive swept through Iraq last June, overrunning large areas north and west of Baghdad.

In their haste to escape, some security personnel shed their uniforms and abandoned vehicles, weapons and other equipment, which the jihadists have since employed against government forces.

The statement from Abadi's office did not specifically mention IS, but the amnesty covers those who fled, were absent or harmed themselves to avoid service.

The amnesty specifically excludes those who committed offences including crimes against state security, corruption and abuse of influence.

It was unclear if tens of thousands of so-called "ghost soldiers," who are on the payroll but do not show up for work, sometimes splitting salaries with their commanders, would be covered.

While Iraqi security forces performed dismally in the early days of the IS-led drive, they have since regained significant territory with backing from pro-government paramilitaries, a US-led coalition and Iran.