"Today, Iran is trying to survive. When I heard the reports two weeks ago, Iran is looking to build a nuclear weapon. I said, don't worry about it," Trump told reporters in the White House.
"I said the last thing they want to do is a nuclear weapon. It didn't work out. And if they did a nuclear weapon, before they got even close, that site would be attacked and it would be wiped out."
Trump earlier this year gave Iran a 60-day ultimatum to reach a nuclear deal, demanding it end all domestic uranium enrichment. Tehran denies seeking a weapon and sees enrichment as a right.
On June 13, the 61st day since US-Iran talks began, Israel launched a surprise military campaign which killed nuclear scientists along with hundreds of military personnel and civilians.
On June 22, the United States joined the fighting with strikes by B-2 bombers and submarine-launched missiles on three Iranian nuclear sites which US President Donald Trump has repeatedly said "obliterated" the country's nuclear program.
'Shot down 1000s of drones'
Trump appeared to acknowledge new details of US military efforts to repel Iranian counterattacks during the conflict.
"We were shooting them down like it was target practice, but we shot down thousands of drones and missiles," he said.
Trump on Monday clinched the release of 20 Israeli hostages in exchange for hundreds of Palestinian political prisoners in a complex international deal he said will bring the devastating two-year-old war in Gaza to a close.
His decision to attack Iran facilitated the breakthrough, he said.
"If we weren't involved, there wouldn't be peace," Trump continued. "If we didn't destroy the nuclear capability of Iran, that deal would have never happened for two reasons: the Arab nations would not have felt bold enough to do it, because you have a very powerful, at that time, Iran - it's not powerful anymore.
Russian President Vladimir Putin, Trump alleged, described the air attack on Iran as a success in private remarks at the two leader's summit in Alaska over the summer.
"(The B-2) is unbelievable as a weapon. I know Putin - when I was riding with him in Alaska, we passed a lot of them, and he said, 'that really did the trick.' I said, 'Yeah, it's amazing."