WASHINGTON—The George W. Bush administration indirectly cooperated with a powerful Iranian spymaster in 2006 to unseat then-Iraqi Prime Minister Ibrahim al-Jaafari, the former U.S. ambassador to Baghdad, Zalmay Khalilzad, said in an interview.

The revelation offers a markedly different view of the Bush administration’s relationship with Iran, a country Mr. Bush once denounced as part of a global “axis of evil.” Though never outwardly friendly, the administration at the time tacitly allowed Iranian influence to work in Washington’s...