Washington is not willing to bow to Iraqi demands to withdraw its troops and any future discussions with Baghdad will be purely confined to the future structure of its forces in the country, the US state department has said.

The recommitment to US troops in Iraq defies an Iraqi parliament vote last week demanding all US forces leave in the wake of the killing of the Iranian general Qassem Suleimani by a drone strike in Baghdad. The US secretary of state, Mike Pompeo, said the US was only willing to discuss force reconfiguration with the Iraqis, and a greater contribution by Nato forces.

Pompeo, still under pressure about the legality of the attack, defended the breach of Iraqi sovereignty inherent in the killing by insisting there was clear evidence that Suleimani “had been plotting a large-scale imminent attack on US facilities throughout the region, including US embassies”.

Later, Donald Trump teased some more details in a manner unlikely to satisfy sceptics. “We will tell you probably it was going to be the embassy in Baghdad,” the president told Fox News. “I can reveal that I believe it would have been four embassies.”

Tens of thousands of Iraqis joined protests in Baghdad and southern cities on Friday denouncing government corruption, Iran and the US for threatening to drag Iraq into a regional war.

“I curse the father of Iran and America,” shouted the crowds as they circled the square, threading their way in between pushcarts selling boiled turnip, sweetmeats and scarves.

“These parties are all Theyol (tails) to their masters in Iran,” said one female protester who covered her face in an Iraqi flag.

The crowds brought back momentum to a movement that seemed to have stagnated in the process of finding a new prime minister, and especially since the US-Iranian confrontation. Protest leaders in Baghdad watched with dread on Friday morning as only a few hundred walked into Tahrir Square, but by the evening the square was packed and crowds spilled into neighbouring streets.

Mothers shepherded teenage daughters and a father pushed a stroller with his infant child towards the barricades on the bridge leading to the green zone, where young men stood waving a large Iraqi flag or carrying pictures of dead friends.

A state department spokesman rejected claims that the US was in discussion with the caretaker Iraqi prime minister, Adel Abdul Mahdi, about the terms of a US withdrawal, saying: “Any US delegation sent to Iraq will be dedicated purely to discussing how to recommit to our strategic partnership, not to discuss troop withdrawal.”

Earlier this week, Trump threatened to impose economic sanctions on Iraq if it refused to house US troops, and said Iraq would be required to pay for the cost of any US troop withdrawal.

But Washington appears to have resolved it will not serve US strategic interests to quit on any terms at present, even though there is a question about the legal basis on which US forces can remain without the permission of the Iraqi government.

A total of 5,500 US troops are in Iraq, and the US is in discussion with Nato officials about an increase in non-US Nato contribution. The multinational force is largely dedicated to training Iraqi soldiers in the fight against Islamic State.

Iran’s main stated strategic goal is the removal of US troops from Iraq, as a precursor to a wider US withdrawal.

The US argues that the Iraqi parliamentary vote was non-binding, and that its legitimacy was undermined by neither Iraqi Kurds or Sunnis participating.

In what Pompeo described as a mischaracterisation of his discussion with the Iraqi prime minister on Thursday night, the Iraqi government said the leader asked Pompeo to “send delegates to Iraq to prepare a mechanism to carry out the parliament’s resolution regarding the withdrawal of foreign troops from Iraq”.

The Iraqi statement continued: “American forces had entered Iraq and drones are flying in its airspace without permission from Iraqi authorities and this was a violation of the bilateral agreements.”

The prime minister said his country “rejects all violations against its sovereignty, including the barrage of ballistic missiles that Iranian forces fired targeting against US troops in Iraq and also America’s violation of Iraq’s airspace in the airstrike that killed a top Iranian general last week.”

Trump has held an ambivalent, if not contradictory, position about US troops in Iraq, sometimes favouring complete withdrawal but at other times warning Iraq that it has no right to throw US forces out. The call for additional Nato troops is one way of reducing the US troop contribution without abandoning the space to either Isis or Iran.

Washington also announced a fresh wave of sanctions against Iran, focusing on iron manufacturing, steel and textile companies. Eight senior Iranian officers were also targeted.

The US treasury secretary, Stephen Mnuchin, said he was 100% confident that sanctions were working and depriving the Iranian government of billions of dollars.

He also warned Europe that its planned vehicle to boost trading with Iran, Instex, would probably be subject to US sanctions, adding that there had been direct conversations with European leaders this week demanding the EU leave the Iran nuclear deal.

EU foreign ministers in Brussels met to discuss how they remain in the Iranian nuclear deal after the Iranian decision to rescind all its commitments to the deal except to allow continued UN inspections of its nuclear-related sites.

The German foreign minister, Heiko Maas, said the deal “makes sense” because it binds Iran into not developing nuclear weapons: “We want this agreement to have a future, but it only has a future if it is adhered to and we expect this from Iran.”

It also emerged on Friday that the US military tried and failed to kill another senior Iranian commander on the same day as Suleimani. The airstrike targeted Abdul Reza Shahlai, a high-ranking commander in Iran’s Revolutionary Guards, but the mission was not successful, unnamed US officials told the Associated Press.