For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Rudy Giuliani is in danger of being charged with acting as an unregistered foreign agent. Federal prosecutors in Manhattan are investigating President Donald Trump’s personal lawyer for possible crimes including violating the Foreign Agents Registration Act, or FARA, reports say. And on Wednesday the Washington Post reported that Giuliani negotiated earlier this year to be paid $200,000 to represent Ukraine’s top prosecutor at the same time the two were working together to dig up dirt on former Vice President Joe Biden and other matters. His firm also stood to make $300,000 for repping Ukraine’s Ministry of Justice. The talks went far enough for the parties to create draft retainer agreements, according to the Post and New York Times.

These negotiations were in early 2019—not long before Giuliani put the prosecutor, Yuri Lutsenko, in touch with John Solomon, a right-leaning US journalist then at The Hill. (Giuliani described connecting Lutsenko in an interview last week with far-right pundit Glenn Beck.) Solomon publicized Lutsenko’s claims, many of which Lutsenko later withdrew, winning the prosecutor attention from Trump’s circle. Lutsenko used that access to influence US policy toward Ukraine, helping to force the ouster of Marie Yovanovitch, the former US ambassador to Ukraine, who was critical of Lutsenko; his cultivation of top Trump administration officials may have also been part of his effort to hang onto his job after President Volodymyr Zelensky’s election in April. (Underscoring the legal danger to Giuliani, Lutsenko is reportedly the unnamed official described in the indictment of two Giuliani associates, Lev Parnas and Igor Fruman, as directing a plot to oust Yovanovitch.)

Giuliani’s contract with Lutsenko would reportedly have involved helping Ukraine recover assets the prosecutor claimed had been stolen from the country’s government; Giuliani was supposedly not going to be paid to lobby personally for Lutsenko. And Giuliani says he “never received a penny” from the prosecutor.

But these excuses may not get Giuliani off the hook on foreign lobbying laws. You don’t have to be paid to be considered a foreign agent under FARA, a World War II–era law that requires anyone promoting the interests of foreign clients to register with the Justice Department and detail their efforts. Doing work that promotes the interests of a foreign client can be enough, said Joshua Rosenstein, who heads a FARA practice at Sandler Reiff Lamb Rosenstein & Birkenstock, a DC law firm. In helping Lutsenko win publicity while negotiating to be paid by him, Giuliani probably engaged in conduct covered by the law, the lawyer said. “You have a foreign official, number one, asking a US consultant to advise him on a media strategy that influences the US public with regard to US policy toward Ukraine, and number two, asking the consultant how to interact with the Trump administration with reference to US policy,” Rosenstein said. “Both of those actions seem squarely covered by FARA.”

Since leaving the New York mayoralty, Giuliani has represented foreign parties. He has acted as a lawyer, helping clients with legal issues in the United States, and as a consultant, offering security advice to cities and states around the world. After becoming Trump’s attorney last year, Giuliani continued to represent foreign clients. His negotiation with Lutsenko, while particularly brazen, is just one of many engagements for which the former mayor has drawn accusations of acting as unregistered foreign agent.

The Post reported Tuesday that Giuliani had represented Alejandro Betancourt López, a rich Venezuelan, in a meeting earlier this year aimed at preventing Betancourt from facing charges in a federal case in Miami. That case targeted Venezuelans alleged to have embezzled billions of dollars from the country’s state-owned oil company, Petroleos de Venezuela S.A. Giuliani has also advised Bahrain on security and delivered paid speeches abroad, including multiple addresses to a group controlled by the National Council of Resistance of Iran, during which Giuliani urged US support for the overthrow of Iran’s government, a policy that group champions. Prior to joining Trump’s legal team, Giuliani was paid by a Ukrainian oligarch for a speech in Kyiv and hired by another rich Ukrainian with Russian ties to advise the city of Kharkiv in eastern Ukraine.

Giuliani has never registered as a foreign agent with the Justice Department. Nor has he registered as a lobbyist of any kind. In various public statements, he has said he doesn’t need to. That’s because his work with foreign interests falls under categories that don’t require registration, he claims. One, he works as Trump’s lawyer. So he claims his actions in Ukraine are merely part of an effort to defend Trump. Two, Giuliani works as a security consultant, and he claims he’s doing nothing more than giving foreign states and cities advice on improving emergency services or defenses. He says he doesn’t lobby for them in the US. Three, Giuliani works as a lawyer for foreigners with legal issues in the US. People doing purely legal work don’t have to register under FARA. Giuliani also contends his paid speeches are not covered by FARA. But FARA experts told Mother Jones these arguments are not persuasive.

Even before the news Wednesday about Giuliani’s negotiations with Lutsenko, Trump had badly undermined Giuliani’s claim that all his efforts were on the president’s behalf. “I didn’t direct him,” Trump told conservative pundit Bill O’Reilly on Tuesday. “Rudy has other clients other than me,” Trump said.

FARA’s legal exemption is narrow. “Just because you’re a lawyer doesn’t mean you’re exempt,” noted Craig Engle, who heads Arent Fox’s political law group. If Giuliani merely met with DOJ about Betancourt Lopez’s case, he’s probably not required to register. But if Giuliani took any steps to help Betancourt Lopez win helpful media coverage or tried to influence US policy on Venezuela more broadly, “that is FARA contact,” Engle said.

Rosenstein said Giuliani’s work for the city of Kharkiv may also require FARA registration, given that Pavel Fuks, the Ukrainian mogul who paid Giuliani for the work, has said he understood he was hiring the former mayor to lobby in the US for the city and to secure American investments for it. Giuliani also appeared to promote the city in the United States when he met with a delegation from there in March 2018. “If Rudy gave any advice on their political strategy, that is enough to require registration,” Rosenstein said.

And Giuliani’s speeches on Iran are especially problematic. That’s because Giuliani surely knew his calls for the overthrow of the Iran’s regime were in effect a call to change US policy, and one he made while being paid by a group urging such a change, Rosenstein said. “I cannot find a way that he would exempt for that speech,” the lawyer said, referring to an address on Iran that Giuliani gave this summer in Albania.

Citing press reports on Giuliani’s activity, Democrats in the Senate since last year have urged the Justice Department to investigate whether he is violating FARA. In the last few years, Trump’s former campaign chair, Paul Manafort; Manafort’s former associate Rick Gates; and former White House National Security Adviser Michael Flynn have all been prosecuted at least in part for violating FARA.