Former Secretary of State John Kerry met two weeks ago with a top Iranian official at the United Nations to try to use shadow diplomacy to keep the U.S. from scuttling the nuclear deal that he negotiated in 2015 under President Barack Obama.

Kerry met with Iranian Foreign Minister Javad Zarif, The Boston Globe reported Friday, marking the second time in as many months that they have met to discuss the deal.

Kerry, according to the report, "has been on an aggressive yet stealthy mission to preserve" the nuclear deal, "using his deep lists of contacts gleaned during his time as the top U.S. diplomat to try to apply pressure on the Trump administration from the outside."

President Donald Trump has long slammed the agreement and has to decide by May 12 whether the U.S. will remain in the accord.

Trump ripped the deal again Friday at the annual convention of the National Rifle Association in Dallas, even taking a swipe at Kerry.

"We signed that horrible deal," Trump told about 7,500 attendees at the Kay Bailey Hutchinson Convention Center. "They're marching in the streets saying, 'Death to America.'

"Who signs a deal when they are marching saying, 'Death to America?'" he asked.

The president attacked Kerry as "not the best negotiator we have ever seen.

"He never walked away from the table," Trump said.

According to the Globe, others Kerry has discussed Iran with in recent months include German President Frank-Walter Steinmeier; Federica Mogherini, a top official of the European Union; and French President Emmanuel Macron.

"It is unusual for a former secretary of state to engage in foreign policy like this, as an actual diplomat and quasi-negotiator," Michael O'Hanlon of the Brookings Institution told the Globe.

"Of course, former secretaries of state often remain quite engaged with foreign leaders, as they should, but it's rarely so issue-specific, especially when they have just left office."

Kerry declined to comment, but observers said he was working quietly to not push President Trump toward exiting the deal.

"You're liable to spur this guy in a direction you don't want him to go in, just to be spiteful," one source said.

A former Obama administration official said little could be gained by aiming directly at Trump.

"At least from our network, you're not going to find messages aimed at him directly," the official told the Globe. "It would be counterproductive.

"Anything with our brand attached to it, he'll run in the opposite direction."