Former NYC mayor Rudy Giuliani has been under investigation by the FBI for allegedly violating the Foreign Agents Registration Act (FARA) but the feds have really always been after former President Donald Trump, Giuliani revealed Monday on "Hannity."

Giuliani, former attorney to Trump, explained that the FBI obtained a covert warrant to search his iCloud records from May 1, 2018 to November 4, 2019 – May 1 being the same day Giuliani began representing the former president amid the Russia collusion investigation.

"You can’t say that their main interest wasn’t Donald Trump," he said. "The day that I begin representing him is the day they go invade my iCloud. So try telling somebody that it wasn’t to get the material on Donald Trump."

The FBI last week raided Giuliani’s Manhattan apartment as part of the ongoing investigation on his potential violation of FARA while lobbying on behalf of Ukrainian officials in 2019.

MAINSTREAM OUTLETS FACE DELUGE OF CRITICISM FOR RETRACTED GIULIANI STORY, USE OF ANONYMOUS SOURCES

The New York Times, The Washington Post and NBC News all released and retracted false anonymous statements that Giuliani was warned by the FBI he was a target of a Russian disinformation campaign. Giuliani said the media has been trying to incorrectly connect him with Russia for years.

"I’m probably the biggest anti-communist you’ve ever met," he said. "There’s no way that I’m a Russian agent or anybody else’s agent. I was a lawyer who was representing a client who was innocent. The biggest burden a lawyer can have is to represent an innocent man and I did it damn well."

Giuliani pressed that he had absolutely no hand in lobbying against FARA laws and is still being targeted by the media for exposing the contents of Hunter Biden’s laptop.

CLICK HERE TO GET THE FOX NEWS APP

"This is totally done because they want to destroy my credibility because I have that entire hard drive," he said. "I put it out to the New York Post and since then they have been persecuting me. They’ve been threatening me, they’ve done everything they can to destroy every business relationship I have. They have put out all kinds of false stories."

"If they’re lying about that, isn’t it obvious they’re lying about everything else?"

Fox News' Brandon Gillespie contributed to this report.