Michael Flynn, who was fired as national security adviser, retroactively registered as a foreign agent after he was paid $530,000 for lobbying work during the presidential campaign that may have benefited the Turkish government, according to a report Thursday.

The former Army general filed paperwork on Tuesday with the Department of Justice revealing he worked for a Turkish company from August to November while he was an adviser to Donald Trump, the Associated Press reported.

According to the filing documents, the work “could be construed to have principally benefited the Republic of Turkey.”

A Turkish businessman, Ekim Alptekin, whose company hired Flynn’s firm, told the wire service that the amended filings were made in response to “political pressure” by the DOJ.

Alptekin also said he’s demanding a partial refund of the $530,000 because he wasn’t satisfied with the company’s work, which involved getting information about cleric Fethullah Gulen, who lives in Pennsylvania and was accused of organizing a failed coup in July against Turkish President Recep Tayyip Erdogan.

Alptekin has ties to Erdogan, according to the filings.

Flynn stepped down as President Trump’s national security adviser Feb. 13 after reports revealed he misled White House officials about his contact with Russian Ambassador Sergey Kislyak during the presidential campaign.

White House spokesman Sean Spicer said Trump wasn’t aware Flynn had been working as a foreign agent when he appointed him to the national security post.

Spicer also defended Flynn’s work with Turkey, saying he did so as a “private citizen.”

“This is what he did for a living,” Spicer said during a press briefing in the West Wing. “There’s nothing nefarious about doing something legal as long as the proper paperwork is filed.”

Alptekin hired Flynn’s consulting company, Flynn Intel Group Inc., to dig up information about Gulen, whom Erdogan wanted extradited to Turkey, and pressure the US government to hold congressional hearings to investigate him, the AP reported.

In October, Flynn Intel met with members of the House Homeland Security Committee about Gulen, pressing an investigation, the AP reported, citing a US official.

Then, in a blog posted on Election Day, Nov. 8, on The Hill, Flynn made a case for supporting the US ally in the fight against the Islamic State.

In the post, Flynn said Gulen “portrays himself as a moderate, but he is in fact a radical Islamist.” He argued that the US should not “provide him safe haven.”

Flynn said in the filings that the research for the post about Gulen was provided by Alptekin’s Dutch-based company, Inovo.

His lawyer, Robert Kelner, said Flynn Intel closed after its contract with Inovo ended, according to the filings.

Calls to Flynn and Kelner weren’t answered, the AP said.

With Daniel Halper