Reports that former Secretary of State John Kerry held talks with Iranian officials in an attempt to save the nuclear deal played a role in President Donald Trump's decision to withdraw from it, two White House sources told The Daily Caller on Wednesday.

Trump was already headed towards leaving the Iran deal, a source with knowledge of the decision process said, but "Kerry just took away any of the teeth of the detractors."

The Boston Globe reported on Friday that Kerry met with Iranian Foreign Minister Javad Zarif multiple times over the last few months, as well as with other prominent officials in an attempt to save the deal.

The news of Kerry's talks with the Iranians broke just as some of the president's advisers were trying to convince Trump of the benefits of keeping the agreement in place, another source inside the West Wing told The Daily Caller.

"It was by no means the reason [Trump] decided to pull out, but it certainly influenced the final decision," the source said. "I mean, read the tweets."

Trump lashed out against Kerry on Twitter on Monday, just one day before announcing his decision to leave the Iran deal.

The United States does not need John Kerry's possibly illegal Shadow Diplomacy on the very badly negotiated Iran Deal. He was the one that created this MESS in the first place! — Donald J. Trump (@realDonaldTrump) May 7, 2018