US Secretary of State Mike Pompeo acknowledged Iraq’s efforts to restore security after attacks on US diplomatic personnel and forces. Militia violence against the US-led coalition fighting ISIS has been going on for months, although only a few of the attacks have claimed lives. The US threatened to close its embassy in Baghdad if the attacks continued and the government did not stop or rein in the militias. “We are happy that the Iraqis are doing more to provide increased security for our team,” Mr Pompeo said. This week, a group of militias calling itself the Iraqi Resistance Co-ordination Commission announced a conditional ceasefire in return for a clear timeline for the withdrawal of US troops from Iraq. “We have a rogue set of militias who have now promised not to violate the Iraqi people’s sovereignty, [not] to take aim at US diplomats serving there to help the Iraqi people,” Mr Pompeo said. Mohammed Mohi, spokesman for Iran-backed the Kataib Hezbollah militia who announced the offer but did not state a deadline, said: "If America insists on staying and doesn’t respect the parliament’s decision, then the factions will use all the weapons at their disposal." Mr Pompeo said the “Iraqi people have come to understand the malign activity that the Iranians are engaged in, including through the proxy forces". The US embassy in Baghdad said it called on all parties in Iraq to return weapons to state control, act responsibly and focus on helping the government through the crises it is dealing with. “Actions by militias operating outside of the control of the government put at risk all the work being done by Iraqis and the international community, and jeopardise attempts by the Iraqi government to attract international investment to Iraq,” a spokesman said. The US and other partners in the international community were “focused on helping Iraq to deal with an economic crisis, a pandemic, and a highly unstable security environment", he said. The attacks prompted Washington to consider shutting its embassy in Iraq. This led to concern in Baghdad that Iran’s influence there would increase. Iraqi cleric Moqtada Al Sadr announced a series of peace pacts to restore security and ensure that foreign interference was eliminated. Mr Al Sadr said the pacts support peaceful demonstrations to campaign for legal and social conditions that must be agreed to by tribal sheikhs and members of the broader Iraqi society. “Those who wish to demonstrate must abide by the rules,” he said. The cleric also said that protesters must not engage in "ways that would obstruct daily activities, such as closing roads and violating public spaces". Anti-government demonstrations flared up last year as a reaction to poor public services, unemployment and foreign interference in Iraqi affairs.