Iranian jets have carried out airstrikes against Islamic State militants in Iraq in recent days, Pentagon officials and independent analysts say, underscoring the strange alliances generated by the war against the extremist group that has beheaded Americans and killed and terrorized Iraqi civilians. 

Washington and Tehran are locked in tough negotiations over Iran's nuclear program. But the two adversaries have been fighting parallel campaigns on the same side in Iraq to defend the Shiite-dominated government -- and the region's Kurds -- from ISIS militants who seized a large section of the country. 

It has long been known that Iranian troops and advisers have been fighting alongside Iraqi forces, but until this week there had been no confirmation of Iranian air activity. The timing and nature of the strikes are not clear, but a senior U.S. official said they occurred in Diyala province, which extends from northeast Baghdad to the Iranian border. The official spoke only on condition of anonymity because he was not authorized to disclose that information. 

The Qatari-based broadcaster Al-Jazeera filmed a jet flying over Iraq on Nov. 30 that was identified by Jane's Defence Weekly as an American-made F-4 Phantom. The Phantom, a twin-engine fighter bomber that was sold to Iran's U.S.-backed shah in the 1970s, was last produced by McDonnell Aircraft Corp. in 1981. 

Iran in the 1980s fought a brutal, ultimately stalemated war with Iraq when that country was led by Saddam Hussein and his Sunni-controlled Baath Party. But the U.S.-led invasion that toppled Saddam left an Iraqi government closely aligned with Iran. A majority of Iraqis are Shiite, as are most Iranians. The Islamic State group, which also controls parts of Syria, is led by Sunni extremists and has attracted many Sunnis who felt disenfranchised by Baghdad. 

In public, U.S. officials have walked a careful line over the strikes, while Iranian officials have flatly denied them. Neither side has an interest in appearing to cooperate with the other. 

America's Arab allies in the fight against the Islamic State, including Sunni-led Saudi Arabia and Qatar, would not want to be seen as fighting alongside Shiite Iran against a group of Sunni militants. 

Rear Adm. John Kirby, the Pentagon's chief spokesman, said Tuesday he had seen "nothing that would dispute" that Iran has carried out airstrikes in eastern Iraq. The U.S. was "not taking a position" on the strikes, he said. 

Speaking in Brussels on Wednesday, Secretary of State John Kerry said that Iranian attacks on IS militants would represent a positive development. 

"I think it's self-evident that if Iran is taking on ISIL in some particular place, and it's confined to taking on ISIL, and it has an impact, its net effect is positive," Kerry told reporters. "But that's not something we're coordinating." 

In Iran, a spokeswoman for the foreign ministry, Marzieh Afkham, denied that Iran has cooperated with the U.S.-led coalition, but she neither confirmed nor denied Iranian airstrikes against ISIS in Iraq. 

Iraqi Prime Minister Haider al-Abadi, also sensitive to the US-Arab coalition that has been carrying out airstrikes against IS and training the Iraqi military to take ISIS on itself, told reporters Wednesday, "I'm not aware there were Iranian airstrikes." 

Hakim al-Zamili, a Shiite Iraqi lawmaker who heads the Security and Defense Committee in Parliament, said Iran "is serious in fighting Daesh," using the Arabic acronym for the Islamic State group. "It has advisers in country. It provides Iraq with weapons and ammunition," al-Zamili said, adding that he had no knowledge of whether Iranian airstrikes had been carried out. 

"If Iran has carried out airstrikes against Daesh, in coordination with the Iraqi government, it is a welcomed step," he said. 

It is unlikely to be welcomed, however, by Republicans in Congress who accuse the Obama administration of not being tough enough on Iran, which the U.S. calls a state sponsor of terrorism. 

Iran supports the Syrian government of Bashar Assad, which the U.S. wants to remove. American officials have expressed hope that Iran could play a role in negotiating an exit for Assad and help bring an end to a Syrian civil war that fueled the growth of the Islamic State group. 

While most of the territory controlled by the group in Iraq lies along the western border with Syria, Diyala province along the Iraq-Iran border has been the scene of fierce fighting between security forces and the militants. 

Last month, Iraqi troops backed by Shiite militiamen and Kurdish security forces recaptured Jalula and Saadiya, seized by the militants in August. Heavy clashes continue in Diyala, with some pockets of resistance outside the two towns.