The Iraqi armed services are likely to target widely-hated American security contractors when they lose their immunity to Iraqi law under a new agreement between the US and the Iraq.

The main American concession, during prolonged and rancorous negotiations over a Status of Forces Agreement (Sofa) that would determine the future military relationship between the US and Iraq, has been to agree to lift the immunity hitherto enjoyed by the 154,000 contractors, of whom 35,000 are private security men.

"The Iraqi forces will follow them with vigour because they are not popular in Iraq," said Ahmed Chalabi, the veteran Iraqi politician, in an interview with The Independent. "People haven't forgotten about the Iraqis who were killed by private security men in Nisour Square." Security personnel from Blackwater USA are accused of killing 17 Iraqi civilians, including a mother and child, when they opened fire in the square in west Baghdad on 16 September last year.

Download the new Independent Premium app Sharing the full story, not just the headlines

The ending of immunity will have serious consequences for the 142,000 US troops in Iraq, who are highly reliant on contractors. Mr Chalabi says it is likely that the Iraqi security forces and judiciary will go out of their way to arrest foreign security men who break Iraqi law, which they have so far flouted.

He also said that the loss of immunity of American contractors would make US intelligence operations more difficult because private companies have been used to maintain links with opponents of the Iranian regime based in Iraq, notably the Mojahedin-e Khalq. This enables the US government to deny that it has contacts with such groups.

Mr Chalabi, who recently returned from Iran where he had talks with Iranian leaders, said: "The Iranians are implacably opposed to the deal. It consecrates America's massive presence here and threatens their security. They say this will be a 'non-security agreement' and 'not a security agreement' and they are happy for everybody to know it."

Iranian hostility would be serious for Iraq since Iran played a central role in mediating an end to fighting between the Mehdi Army Shia militia and the government earlier this year.

In an unexpected but important development, the negotiation of a US-Iraqi agreement, to replace the current UN mandate for US forces that is due to run out at the end of the year, is leading to a resurgence of Iraqi nationalism previously masked by Shia-Sunni sectarian conflict.

The Iraqi Prime Minister, Nouri al-Maliki, embarrassed the White House by saying on Monday that Iraq wants some kind of timetable for a withdrawal of American forces included in the present agreement.

The national security adviser Mowaffak al-Rubaie followed this up by saying: "We would not accept any memorandum of understanding with [the US] side that has no obvious and specific dates for the withdrawal of foreign troops from Iraq." American officials have tried to present these demands as conditional on the effectiveness of the Iraqi security forces, which now number over half a million men. An Iraqi official supporting a US-Iraq agreement said: "It will be easier to sell it to Iraqis if it is presented as a way of getting the Americans to withdraw. We still need them. We could not cope if, hypothetically, there was an uprising in Basra, an army mutiny in Anbar or the Kurds unilaterally annexed Kirkuk."

But important Iraqi leaders have sought to outbid each other in criticising American rights under Sofa, while Iraqi supporters of the agreement have been largely mute. This suggests that the position of the Republican presidential candidate John McCain, that the US occupation should continue for many years, will soon no longer be tenable.

"We should negotiate with the next administration," said Dr Mahmoud Othman, the veteran Kurdish politician and MP. "A letter of understanding will be sufficient for now. If the agreement does not bind the next administration, why sign it? People will think it is being done to help the Republican party."

Defenders of Sofa, such as the Foreign Minister, Hoshyar Zebari, say the agreement will limit and define American rights in Iraq. The alternative is the UN mandate, under which US forces can do what they want. The negotiations have provoked a nationalist backlash among Arab Iraqis because they highlight the extent to which America will control their country in future.