Although U.S. assistance to Tehran was strictly for "peaceful purposes," after America and Iran had its unfortunate 'falling out' in 1979, the technology, equipment, and expertise provided ended up advancing Iran's nuclear weapons program. But not immediately. Many of Iran's nuclear-trained scientists/engineers fled the country in the wake of the 1979 Iranian Revolution, and this loss, compounded by Ayatollah Ruhollah Khomeini's opposition to nuclear technology, resulted in the near disintegration of Iran's nuclear program post-1979.
I wrote about America's chequered past as an ally of Iran in an earlier post, in which I described the CIA's meddling in internal Iranian political affairs, and how that, and America's stubborn support of Shah Mohammad Reza Pahlavi, led to distrust of and then hate for America by the Monarchy's opposition. The student-led storming of the American embassy and the taking of American hostage in November of 1979 cemented the wall of enmity and distrust between the two countries that lasts to this day.
Iran’s decades long nuclear weapons development efforts are the backdrop for my novel, The Lion and the Sun, which I wrote about in another blog post.