Donald Trump jokes with Michael Flynn at a campaign rally in Grand Junction, Colo., on Oct. 18, 2016. (George Frey/Getty Images)

President Trump and his former national security adviser Michael Flynn have lambasted political opponents for taking the Fifth Amendment.

But at different times in the past, both men have exercised the constitutional right that protects them from self-incrimination.

Flynn did so Monday, when he refused to comply with a Senate Intelligence Committee subpoena to turn over documents pertaining to any contacts he had with Russian officials. The committee is investigating Russian meddling in the 2016 presidential election.

Trump himself invoked the Fifth Amendment in 1990, during his bitter and public divorce from his first wife, Ivana Trump. The real estate mogul took the Fifth to avoid answering questions about adultery; according to Wayne Barrett's “Trump: The Greatest Show on Earth,” the Fifth Amendment is Trump's “favorite” and allowed him to not answer a total of 97 deposition questions that were mostly about “other women.”

Several years later, in 1998, after Bill Clinton admitted that he had an affair with Monica Lewinsky, Trump said this about the president: “I'm not even sure that he shouldn't have just gone in and taken the Fifth Amendment.”

But by last year, Trump was singing a different tune: During the presidential election, he repeatedly slammed former staffers for Democratic presidential nominee Hillary Clinton who took the Fifth during a congressional probe into her use of a private email server.

Computer specialist Bryan Pagliano, the former State Department employee who had helped set up Clinton's private email server, asserted the Fifth more than 130 times in June to avoid answering deposition questions from lawyers with the conservative legal advocacy group Judicial Watch. Two computer experts contracted to handle Clinton's email server took the Fifth months later — and two Clinton lawyers who spoke to FBI investigators got immunity for turning over laptops.

Trump was not impressed.

“The mob takes the Fifth,” he said at an Iowa campaign rally in September. “If you're innocent, why are you taking the Fifth Amendment?”

He weighed in numerous times during the campaign, generally sounding disgusted and full of disdain.

“She lied to Congress under oath, and her staff has taken the Fifth Amendment and got immunity deals,” he said at an October rally in Reno.

“It's worse than Watergate; it's a bigger deal than Watergate,” he said at another rally that month in Loveland, Colo.

He called it “disgraceful” during the first presidential debate in Hempstead, N.Y.

Flynn was also vocal in his criticisms. On the same day of Pagliano's deposition, Flynn shared a tweet from his son, who called the former State Department staffer's decision to take the Fifth “unbelievable.”

Three months later, on “Meet the Press,” Flynn, the former general, told Chuck Todd: “When you are given immunity, that means that you have probably committed a crime.”

This week, after Flynn decided to take the Fifth, the Democratic National Committee sent emails to the press resurrecting Trump's previous comments that suggested that people who assert that constitutional right are guilty.

The White House has yet to comment on Flynn's decision.

The chair and vice chairman of the Senate Intelligence Committee have both said they're “disappointed.”

“It does us no good to have people insist on pleading the Fifth if you're out trying to get information,” said Sen. Richard Burr (R-N.C.), the committee's chairman, according to Politico. “The only thing I can tell you is immunity is off the table.”

The Senate committee must decide whether to accept Flynn's decision or hold him in contempt. In a letter to committee leaders, Flynn's attorneys argued that the appointment of Robert S. Mueller III as special counsel on the Russia investigation creates new dangers for Flynn.

That Flynn would be jailed for contempt is a long shot, but it's a risk. Federal criminal defense attorney Todd Bussert told The Washington Post that although the Fifth protects people from making incriminatory statements about themselves, it doesn't apply to past statements or documents.

Here is how the Fifth Amendment reads:

No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a grand jury, except in cases arising in the land or naval forces, or in the Militia, when in actual service in time of war or public danger; nor shall any person be subject for the same offense to be twice put in jeopardy of life or limb; nor shall be compelled in any criminal case to be a witness against himself, nor be deprived of life, liberty, or property, without due process of law; nor shall private property be taken for public use, without just compensation.

The Clinton email saga wasn't the only time Trump implied that invoking the Fifth suggests guilt.

When sexual assault allegations began to swirl around Bill Cosby in November 2014, Trump offered some “free advice.”

Criticizing members of the other party for asserting the Fifth is not new, and Republicans aren't the only politicians to do so.

In 1986, for instance, Democratic Sen. John Glenn of Ohio criticized Lt. Col. Oliver North, who was fired in the midst of the Iran-contra scandal.

“I can't think of anything that is going to polarize Capitol Hill more or make this into a political football any more than people taking the Fifth or stonewalling it and preventing all the information from coming up,” Glenn said, according to the Associated Press.

Karoun Demirjian contributed to this report.

Read more:

Trump asked intelligence chiefs to push back against FBI collusion probe after Comey revealed its existence

Flynn was warned by Trump transition officials about contacts with Russian ambassador

CIA director warned Russian security service chief about interference in election