The US has reached an agreement with Iraq on privileges and immunities for the growing number of troops based in the country, helping in the fight against the Islamic State (Isis) militant group, the new US ambassador said on Thursday.

Stuart Jones said prime minister Haider al-Abadi has given assurances that US troops will receive immunity from prosecution. Under Iraq’s former prime minister, Nouri al-Maliki, the issue was a major sticking point, ultimately leading to the decision to withdraw all remaining US troops in late 2011.

“That was a different situation and those troops would have had a different role,” Jones said.

“We have the assurances that we need from the government of Iraq on privileges and immunities,” he said. “It’s in the basis of our formal written communications between our governments and also based on the strategic framework agreement that is the legal basis of our partnership.”

The House was expected to vote on Thursday on a proposed $5bn expansion of US military operations against Isis in Iraq, part of a broader $585bn defense policy bill for Iraq and Syria. Last month, President Obama authorised the deployment of up to 1,500 more American troops to bolster Iraqi forces, which could more than double the total number of US forces to 3,100, in addition to 5,000 people working for the US mission in Iraq.

US ambassador to Iraq Stuart Jones. Photograph: Khalid Mohammed/AP

The US-trained and equipped Iraqi military has struggled to recover from its collapse in June, when Isis captured country’s second-largest city, Mosul, and swept over much of northern and western Iraq. Iraqi commanders fled, pleas for more ammunition went unanswered, and in some cases soldiers stripped off their uniforms and ran. The US began launching airstrikes in Iraq on 8 August, and now heads a coalition backing Iraqi and Kurdish ground forces from the air.

US advise and assist teams, which were based in Baghdad and the Kurdish regional capital Irbil, are now fanning out to other locations in the country, including the highly volatile Anbar province in western Iraq, where US troops fought some of the heaviest battles of the eight-year conflict.

This time the troops are operating far from the front lines. “What we’re doing is airstrikes,” Jones said. “What we’re doing is sharing intelligence. We’re doing advise and assist and we’re doing training – and that’s all we’re doing.”

He declined to address whether US ground troops will be needed to defeat Isis, instead pointing to recent successes by Iraqi security forces in retaking territory, including the town of Beiji and the country’s largest oil refinery, as well as Jurf al-Sakher, south of Baghdad.

Iraq’s Shia militias, or Popular Mobilisation Forces, played a central role in those victories. They have also been accused by rights groups of abducting, torturing and killing scores of Sunni civilians in reprisal attacks.

“Let’s be frank: they play an important role in the security of Iraq,” Jones said of the Iran-supported militias. “They have been an effective fighting force and they have greatly assisted Iraqi security forces in some of these military victories … Now, they need to really be brought under the supervision and control of the armed forces.”