Washington (CNN)President Donald Trump on Thursday accused former Secretary of State John Kerry of violating the Logan Act by taking part in negotiations with Iran's government, which in recent days has announced it will reduce its commitments under the 2015 nuclear deal that the Trump administration pulled out of last year.Kerry promptly denied the President's accusation.During an event focused on medical billing at the White House, Trump alleged that Kerry, who served as secretary of state under President Barack Obama, is undermining the current administration's efforts with Iran by participating in calls and meetings with the Iranian government."What I'd like to see with Iran, I'd like to see them call me. You know John Kerry speaks to them a lot. John Kerry tells them not to call. That's a violation of the Logan Act and frankly he should be prosecuted for that," Trump said.Facts First: Putting aside Trump's charge against Kerry, which Kerry flatly denies, here's what you need to know about the Logan Act. The act was established in 1799 and makes it a felony for individuals who are not authorized by the US government to negotiate with foreign governments which have disputes with the US. Though the term has been thrown around as an accusation several times this century -- and has been used more than once by Trump to attack Kerry -- there have been few cases when someone has been indicted for violating the act. These cases took place in the 1800s and no one was ever convicted.Since the act's creation, correspondence and interaction between Americans -- lawmakers, former lawmakers, and citizens alike -- has become increasingly common.It's also common for former secretaries of states and diplomats to stay in touch with their counterparts around the world.Last year, before the administration decided to pull out of the deal, the Boston Globe reported that Kerry was taking part in meetings with big players in Iran, meetings which were promptly criticized by the Trump administration. However, last October, Kerry told reporters that he had not met with Iranians since the US pulled out of the Iran nuclear deal in May 2018 and had seen Iran's foreign minister at a few international security meetings.Trump alleged that Kerry "is talking to Iran and has been. He's had many meetings and phone calls and he's telling him what to do."But Matt Summers, a spokesman for Kerry, said in a statement that Trump's claim "is simply wrong, end of story.""He's wrong about the facts, wrong about the law, and sadly he's been wrong about how to use diplomacy to keep America safe. Secretary Kerry helped negotiate a nuclear agreement that worked to solve an intractable problem. The world supported it then and supports it still. We'd hope the President would focus on solving foreign policy problems for America instead of attacking his predecessors for theater," Summers said.A source close to the former secretary of state said Kerry hasn't talked with Iranian officials since President Trump announced the US was pulling out of the Iran deal last year.Prior to the withdrawal, the source said Kerry did communicate with the Iranians to urge them to stay in the deal.The source also denied that Kerry ever discouraged the Iranians from talking to Trump. At the time, the source said, Kerry urged everyone on all sides to talk and use diplomacy.Former Trump National Security Adviser Michael Flynn was also accused of potential Logan Act violations.At Flynn's sentencing hearing in December, special counsel team prosecutor Brandon Van Grack said this about Flynn's case: "[T]he facts could potentially, potentially support a violation of the Logan Act."Flynn did two things, that he later lied about, during the presidential transition that could have had Logan Act consequences. First, he encouraged world leaders to vote against a United Nations resolution on Israeli settlements, bucking the Obama White House position.Second, he undermined sanctions established under President Barack Obama against Russia in his phone conversations with Russian Ambassador Sergey Kislyak.But Flynn was never charged with violating the Logan Act.CNN's Michelle Kosinski, Nicole Gaouette and Marshall Cohen contributed to this report.