BAGHDAD (Reuters) – Iraq's military said on Thursday it was resuming operations with the U.S.-led coalition against Islamic State which had mostly halted after bases hosting U.S. troops came under rocket attacks and a U.S. drone strike killed a top Iranian commander.

U.S.-Iranian tension threatens to derail the fight against the Sunni extremist group, which seeks a resurgence in northern Iraq three years after its military defeat at the hands of the coalition, Iraqi forces and Iran-backed Shi'ite Muslim militias.

That tension boiled over when the United States killed Iranian military mastermind Qasem Soleimani in a drone strike in Baghdad on Jan. 3.

The U.S.-led coalition, which is in Iraq to assist the military in fighting IS, said on Jan. 5 it was putting most of its operations on hold to focus on the security of its own troops as rockets fired by Iran-backed militia groups targeted bases hosting U.S. forces.

Iran then fired missiles that hit two of those bases on Jan. 8 in the first-ever direct Iranian attack on U.S. forces in Iraq.

Iraq's parliament voted to press the government to eject all U.S. troops from Iraq following the killing of Soleimani, a move that Iraqi military officials say could jeopardize the fight against IS, in which U.S. warplanes provide crucial support.

“In order to exploit the time that remains for the international coalition before the new relationship is set up … it was decided to carry out joint actions” to defeat IS, an Iraqi military statement said on Thursday.

The statement did not elaborate on what changes would be made in the military relationship between the coalition and Iraqi forces.

Baghdad condemned both the killing of Soleimani and Iran's missile attacks on two Iraqi bases housing U.S. troops as acts of aggression on Iraq and a breach of its sovereignty.

Prime Minister Adel Abdul Mahdi has asked Washington to prepare for a U.S. troop withdrawal in line with the request by Iraq's parliament. So far, the U.S. government has rebuffed the call to withdraw.

However, Washington has said it is exploring a possible expansion of NATO's mission in Iraq, a plan to “get burden-sharing right in the region”.

A statement from the coalition on Wednesday said it would “further develop its support to and close partnership with the Iraqi government (and) the Iraqi security forces.”