Speaker John Boehner on Friday promised Iraq's prime minister that the House will provide the new government in Baghdad the U.S. assistance necessary to defeat Islamic militants.

In an unusual move, Haider al-Abadi wrote to Boehner earlier this week, promising to protect religious and ethnic groups and describing the reforms he is instituting. The prime minister also vowed that Iraq will lead the fight against the Islamic State group — with U.S. help.

"We face an enemy with conventional military capabilities never before wielded by a terrorist group," the prime minister wrote. "We therefore need adequate security assistance and military support from the United States to combat ISIL. With the remolding of our military, the same mistakes at the outset of the ISIL offensive will not be repeated."

Islamic State of Iraq and the Levant, or ISIL, is an alternative name and acronym for the Islamic State group.

Boehner wrote to al-Abadi that he will work with lawmakers to provide Iraq with what it needs.

"From military aid to technical and training assistance, we will stand with you to ensure more innocents are not slaughtered — and that the threat does not metastasize further," the speaker said.

Boehner alluded to the years, dollars and American lives lost that the United States has invested in Iraq, describing the "painful sacrifices" to help the country. He also acknowledged the threat from the Islamic militants.

"ISIL is at war with both of our countries," Boehner wrote. "ISIL is our common enemy and must be defeated so we — and our families, children and grandchildren — may live in peace."

The exchange of letters comes as the House weighs President Barack Obama's request for authority to train and equip moderate Syrian rebels to fight the Islamic militants in Syria. Boehner and several top Republicans have signaled their support for that request, with a vote expected in Congress next week.

In his letter, al-Abadi expressed condolences for the death of two American journalists. He also acknowledged the upcoming midterm elections.

"I know that the plight of my country might be an issue during the campaign," the prime minister wrote. "I can assure you that the investment America made in Iraq was worth the price."