Former Secretary of State John Kerry is being slammed for conducting shadow diplomacy with Iran after admitting to multiple meetings with Iranian officials behind the backs of Trump administration officials -- including over the scrapped nuclear deal.

An administration official on Thursday told Fox News Kerry’s meetings are "shameful," pointing out what Iranian-backed militias are doing to kill and injure people in Syria, Iraq and Yemen.

Other Republicans suggested it may not even be legal.

“John Kerry is out giving advice to Iran about how to maneuver around what Donald Trump is doing; it's insidious,” Ari Fleischer, the former White House press secretary for George W. Bush, said Wednesday on Fox News' "Special Report." “I don't know if it's legal or illegal, I don't care about that side of it. It's wrong.”

Kerry, the former Massachusetts senator who worked as the nation’s top diplomat in the Obama administration, made the comments about his interactions with Iran as he promotes his new book, “Every Day Is Extra.”

During an appearance on Hugh Hewitt’s radio show on Wednesday, Kerry acknowledged meeting with Iranian Foreign Minister Javad Zarif “three or four times” since leaving office, admitting to discussing the scrapped nuclear deal and other issues.

“What I have done is tried to elicit from him what Iran might be willing to do in order to change the dynamic in the Middle East for the better,” Kerry said.

Later Wednesday, during an appearance on Fox News’ “The Daily Briefing with Dana Perino,” Kerry did not deny the suggestion he’s telling the Iranians to wait out Trump until there is a Democratic president again.

“I think everybody in the world is talking about waiting out President Trump,” said Kerry, who ran unsuccessfully for president in 2004 and who has not ruled out a 2020 bid.

It was first reported in May that Kerry met Zarif as he worked to preserve the deal, as part of what the Boston Globe called an “aggressive yet stealthy” mission to put pressure on the Trump administration to keep the deal in some form. Kerry was part of the team that negotiated the deal for the Obama administration.

Trump in May, though, announced plans to leave the Iran nuclear deal, declaring the pact has failed to halt the country’s nuclear ambitions. Last month, the Treasury Department restored sanctions against Iran.

It has been suggested before that Kerry’s meetings with high-profile foreign leaders could violate the Logan Act — which prohibits private citizens from negotiating on behalf of the U.S. government without authorization. No one has ever been successfully prosecuted under the law, however.

“This is the question: What was John Kerry doing?” Fleischer asked Wednesday on “Special Report.” “What was he saying, what were the specifics? I don't think it was general, I think he was giving Iran advice about how to wait out President Trump.”

Others suggested hypocrisy was at play, given the suggestions then-Trump national security adviser Mike Flynn violated the Logan Act for his meetings with the ambassador to Russia during the transition. Flynn was not charged with violating the act.

Fox News security analyst Walid Phares referred to Flynn’s situation, pointing out the media considered it a “scandal” when Flynn met with “a diplomat of a country that has an embassy in D.C.” But, he said, they consider it “normal” when Kerry conducts “parallel diplomacy” with “a regime on the U.S. terror list.”

Arkansas Republican Sen. Tom Cotton also knocked Democrats and the media for their “hypocrisy” over not raising the alarm about Kerry’s comments, though he called the Logan Act “a stupid, dead-letter law.”

When the reports of Kerry’s contacts first surfaced this year, Trump blasted Kerry for what he called “possibly illegal Shadow Diplomacy.”

“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!” Trump tweeted Monday.

Kerry, though, speaking to Perino on Wednesday, denied his conversations were inappropriate.

“Every secretary of state, former secretary of state continues to meet with foreign leaders, goes to security conferences, goes around the world,” Kerry said. “We all do that. And we all have conversations (about) the state of affairs with the world in order to understand them.”

Fox News’ Brooke Singman contributed to this report.