President Donald Trump on Friday defended Michael Flynn for seeking immunity, but he had a very different attitude about the strategy when Hillary Clinton staffers reportedly used it.

The former national security advisor told the Senate Intelligence Committee he is willing to be interviewed for its ongoing investigation into alleged Russian influence on the 2016 election in exchange for immunity from prosecution, a congressional official told NBC News. His lawyer said in a statement that no "reasonable person" would get questioned in "such a highly politicized, witch hunt environment without assurance against unfair prosecution."

Trump echoed that sentiment in a Friday morning tweet, arguing that Flynn "should ask for immunity" in the ongoing probe into possible ties between the Trump campaign and Russia. The president argued that concerns over Russia were a "witch hunt" of "historic proportion" by media outlets and Democrats.

Trump tweet: Mike Flynn should ask for immunity in that this is a witch hunt (excuse for big election loss), by media & Dems, of historic proportion!

Both Trump and Flynn took a vastly different outlook on immunity when the president was locked in a bitter election campaign with Clinton last year. At a September rally in Florida, Trump highlighted reports that some Clinton aides received immunity in the FBI investigation into her use of a private email server while she was secretary of state.

"If you're not guilty of a crime, what do you need immunity for?" Trump asked at the time. No one was charged with a crime in the investigation.

In a separate October tweet, he asked Clinton why staffers would want immunity.

ATTN: @HillaryClinton - Why did five of your staffers need FBI IMMUNITY?! #BigLeagueTruth #Debates

Flynn also equated immunity with committing a crime in a "Meet the Press" interview last year.

At this time, there is no indication that Flynn is admitting guilt to any crimes.

Flynn resigned in February when reports surfaced that he misled White House officials about whether he discussed sanctions with Sergey Kislyak, Russia's ambassador to the United States. Flynn told Vice President Mike Pence he did not discuss sanctions against Russia with Russian officials in the weeks leading up to the Jan. 20 inauguration. Pence then defended him in TV interviews.

Since leaving the Trump administration, Flynn registered with the Justice Department as a foreign agent for lobbying work that may have aided the Turkish government. It took place from August through November, when he was a Trump campaign advisor. Flynn is required to disclose that work.

Reports also surfaced that Russian state-owned network RT paid more than $45,000 for Flynn to travel to Moscow and speak at its 10th anniversary event.

In a Friday tweet, House Intelligence Committee ranking member Rep. Adam Schiff suggested that the public will learn "a lot more" about why Flynn is seeking immunity when ex-acting Attorney General Sally Yates testifies before the committee. The California Democrat did not specify what that information would be.

Yates, who was set to testify at a hearing this week that got canceled, warned the White House in January that Flynn could be vulnerable to blackmail following his statements about his contacts with Kislyak.