Iranian jets have carried out airstrikes in Iraq against Islamic State militants in recent days, U.S. officials and independent analysts say, underscoring the strange alliances generated by the war against the extremist group that has beheaded Americans and blown up rivals' holy sites.

Washington and Tehran are locked in tough negotiations over Iran's nuclear program. But at the same time, 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 IS militants who have seized large sections of Iraq and Syria.

It has long been known that Iranian troops and advisers have been fighting alongside Iraqi forces against Islamic State militants, but until this week there had been no confirmation of Iranian air activity. The timing and nature of the strikes are not clear, but U.S. officials say some involved American-made F-4 Phantoms, twin-engine fighter bombers that were sold to Iran's U.S.-backed shah in the 1970s, and were last produced by McDonnell Aircraft Corp. in 1981.

Qatari-based broadcaster Al-Jazeera filmed a jet flying over Iraq Nov. 30th that was identified by Jane's Defence Weekly as an Iranian Phantom.

In public, U.S. officials have walked a careful line over the strikes.

Rear Admiral 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, also denied that Iran has cooperated with the U.S.-led coalition, but she neither confirmed nor denied the Iranian airstrikes against IS in Iraq.

Iraq's Prime Minister, Haider al-Abadi 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," a term 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 Islamic State group in Iraq lies along the western border with Syria, one province along the Iraq-Iran border has been the scene of fierce fighting between security forces and the Islamic State 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 the province with some pockets of resistance outside the two towns.

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 is led by Sunni extremists and has attracted many Sunnis who felt disenfranchised by Baghdad.

Salama reported from Baghdad. John Thor-Dahlburg, Lori Hinnant and Lara Jakes in Brussels, Sinan Salaheddin in Baghdad and Ali Akbar Dareini in Tehran contributed to this story.