Former National Security Adviser Michael Flynn, who was fired in February after lying about his contacts with the Russian government, has formally registered with the Justice Department as a “foreign agent” and admitted that he had lobbied on behalf of the Turkish government as recently as November 2016.

As the Associated Press reports, Flynn’s lawyer filed paperwork with the Justice Department Tuesday disclosing that the retired Army general had done lobbying work between August and November 2016 that “could be construed to have principally benefited the Republic of Turkey.” According to the filing, Flynn’s company, Flynn Intel Group Inc., was paid at least $530,000 for the work.

Flynn’s contract ended on November 15, just three days before Trump appointed him national security adviser.

Still, the disclosure that Trump’s top campaign adviser on all issues of national security and foreign policy was receiving money to lobby on behalf of a foreign power all the way through Election Day is another black eye for Flynn, who has the rare distinction of having been fired by two US presidents (Barack Obama ousted him because of his mismanagement of the Defense Intelligence Agency). The FBI is also continuing to probe Flynn’s communications with Russian Ambassador Sergey Kislyak in the aftermath of the election.

Here’s what we know.

It all starts with a bizarrely pro-Turkish op-ed Flynn wrote

Suspicions about Flynn’s ties to the Turkish government were sparked by an op-ed he wrote in the Hill on November 8 that basically read like a bald piece of Turkish propaganda. In it, Flynn, who had been Trump’s top national security aide during the campaign, slammed the outgoing Obama administration — and the US media more broadly — for not being supportive enough of Turkey’s autocratic leader, Recep Tayyip Erdoğan.

“The US media is doing a bang-up job of reporting the Erdoğan government’s crackdown on dissidents, but it’s not putting it into perspective,” Flynn writes. “We must begin with understanding that Turkey is vital to U.S. interests.”

In particular, Flynn railed against the Obama administration for harboring Fethullah Gülen, a moderate Muslim cleric and intellectual from Turkey who has lived in self-imposed exile in Pennsylvania since 1999. As my colleague Dylan Matthews writes, “Gülen preaches an inclusive brand of Sunni Islam that emphasizes cooperation and tolerance,” and his movement claims millions of followers in Turkey and around the world.

Erdoğan has, unconvincingly, pinned the attempted coup against him in July 2016 on Gülen and his followers. In September, Erdoğan formally asked the Obama administration to arrest Gülen on charges of "ordering and commanding the attempted coup” and demanded he be extradited to Turkey to stand trial. The Obama administration declined to do so, saying that Turkey hadn't provided persuasive evidence that Gülen was actually responsible for the coup.

In the op-ed, Flynn pushed a baseless conspiracy theory that Gülen and his movement were “a dangerous sleeper terror network” and criticized the Obama administration for being “hoodwinked by this masked source of terror and instability nestled comfortably in our own backyard in Pennsylvania.”

“From Turkey’s point of view, Washington is harboring Turkey’s Osama bin Laden,” Flynn wrote.

“It is time we take a fresh look at the importance of Turkey and place our priorities in proper perspective,” he concluded. “We need to adjust our foreign policy to recognize Turkey as a priority. We need to see the world from Turkey’s perspective.”

The Daily Caller finds documents tying Flynn’s consulting firm to the Turkish government

To summarize: A Trump campaign surrogate with substantial influence over the incoming president’s foreign policy views wrote an article parroting a conspiracy theory propagated by the Turkish government to justify a brutal and far-reaching crackdown on political dissent.

That got some American journalists wondering if there was something more there. And sure enough, just three days after the op-ed ran, the Daily Caller published a stunning report showing very suggestive links between Flynn's consulting firm and the Turkish government.

In October 2014, shortly after he was fired from his job as director of the Defense Intelligence Agency, Flynn founded a consultancy called Flynn Intel Group Inc. The Daily Caller found documents showing a Dutch company called Inovo BV hired the Flynn Intel Group in August 2015 to lobby Congress on bills funding the departments of State and Defense.

Inovo was founded by a Turkish businessman named Ekim Alptekin, an Erdoğan ally who holds a top position on Turkey’s Foreign Economic Relations Board. Alptekin, the Daily Caller reports, even helped coordinate Erdoğan’s 2016 visit to the US.

Flynn's consulting firm had already filed a lobbying disclosure to Congress stating that it was working for Inovo. But the disclosure did not include anything about the company’s ties to the Turkish government. And, as the AP report notes, “neither Flynn nor his company had filed paperwork with the Justice Department, which requires more extensive transparency about work that benefits foreign governments and political interests.”

After the Daily Caller report, Flynn’s company flatly denied having any ties to the Turkish government.

"Flynn Intel Group has no commercial relationship with the government of Turkey and Lt. General Michael Flynn's public statements on foreign affairs and national security issues are entirely his own," Robert Kelley, the Flynn Intel Group’s general counsel whose name was on the initial disclosure to Congress, said in a statement to Politico.

Alptekin also denied it, telling Politico, “I have absolutely no affiliation with the policies of the Turkish government.”

Just so we’re clear here: The founder of Inovo, who serves on Turkey’s Foreign Economic Relations Board (members of which are chosen by Turkey’s general assembly and its minister of economy), denied that his company is affiliated with the Turkish government.

What the new Justice Department filings show

The new Justice Department documents essentially confirm that — contrary to the claims of both Kelley and Alptekin — the lobbying that Flynn Intel Group technically did for Inovo was actually being done on behalf of the Turkish government.

The filings by Flynn attorney Robert Kelner merely state that the lobbying “could be construed to have principally benefited the Republic of Turkey,” and maintain that “Inovo is a privately owned company that has not received, directly or indirectly funds or financial support from any government during the course of its engagement of Flynn Intel Group Inc., including the Republic of Turkey.”

But, again, the head of Inovo is literally a Turkish government appointee. And the Justice Department requires you to register as a foreign agent if the "principal beneficiary" of the work you’re doing is a foreign government, even if that foreign government is not the actual client.

And other details revealed in the filings leave little doubt about the ties to the Turkish government. From the AP report:

According to the new paperwork, Flynn's firm took on the Turkish-related lobbying work in August while he was a top Trump campaign surrogate. Flynn Intel disclosed in its filing that in mid-September, the company was invited by Alptekin to meet with Turkish officials in New York. Alptekin acknowledged Wednesday that he had set up the meeting between Flynn and the two officials. He said they met at an undisclosed hotel in New York. Alptekin said Flynn happened to be in New York while the Turkish officials were attending United Nations sessions and a separate conference Alptekin had arranged. "I asked one of Gen. Flynn's staff if he was in town and would be available to meet and they got in touch with him," said Alptekin, who owns several businesses in Turkey. Among those officials, the documents said, were Turkey's ministers of foreign affairs and energy. Flynn's company did not name the officials but reported the two worked for Turkey's government "to the best of Flynn Intel Group's current understanding."

The new filings also reveal that Inovo paid Flynn’s firm $535,000 between September 9 and November 15 for lobbying services.

The firm's assignment, per Politico, focused on Fethullah Gülen.

According to the filing, Flynn Intel Group also met in October with a representative of the House Homeland Security Committee to discuss a technology developed by another Flynn Intel Group client. An unnamed US official “with direct knowledge of Flynn Intel's work” told Politico that “after discussing the technology, the firm changed the subject to Gulen, pressuring the committee to hold congressional hearings to investigate the cleric.”

In a letter to the Justice Department submitted as part of the filings, Kelner stated that the company had believed at the time that the congressional disclosure was sufficient but had now decided to retroactively register as a foreign agent.

"Nevertheless, because of the subject matter of Flynn Intel Group's work for Inovo, which focused on Mr. Fethullah Gulen, whose extradition is sought by the Government of Turkey, the engagement could be construed to have principally benefited the Republic of Turkey," Kelner wrote.

On Thursday, an editorial note appeared at the bottom of Flynn’s November op-ed — the one denouncing Gülen and calling for his extradition — stating that Flynn did not disclose that he had received payment from Inovo, or that he had reviewed the draft with Alptekin, when he submitted the essay to the Hill.

Why any of this matters

The Justice Department filings state that Flynn’s firm had ceased operations in November, which means he wasn’t receiving money from the company with ties to the Turkish government while he was Trump’s national security adviser.

But it was pretty damn close — he was literally acting as an agent of a foreign government right up to the point that he became Trump’s national security adviser, and during a time when he was acting as a top Trump campaign surrogate.

Given Trump's constant criticism during the campaign about the Clinton Foundation taking money from foreign countries, and Flynn’s own criticism of Hillary Clinton’s “lack of accountability,” this is pretty rich.

Flynn also shot back at some of his military critics during the campaign who felt it inappropriate for a former military officer to be so involved in politics, accusing them of “[using] that title of ‘general’ or ‘admiral’ to get lucrative positions on corporate boards.” This while he was running his own consulting firm.

It's also just another notch in the bedpost of shady nondisclosures of ties to foreign governments by people in the Trump administration, and by Flynn in particular. Flynn was fired from his post as national security adviser amid growing questions about whether he had misled Vice President Mike Pence, and potentially the FBI, about his phone calls with Kislyak, the Russian envoy.

These latest revelations suggest that Flynn’s failure to be fully forthcoming about his ties to a foreign government didn’t stop with Russia.