LAS VEGAS — Supreme Court Justice Brett Kavanaugh got what he deserved when he was accused in his confirmation hearing of sexual assault — because of his role in investigating the Clintons in the 1990s, former President Bill Clinton suggested.

"He didn't have any problem making us put up with three years of Vince Foster nonsense that was a total charade," Clinton, 72, said Sunday during a joint appearance with his wife Hillary at the Park Theater in Las Vegas during the last stop in the 10-event "An Evening With the Clintons” speaking tour.

A childhood friend of Bill Clinton, Foster, 48, became a deputy White House counsel in Clinton's White House in 1993 after being a partner at the Rose Law Firm in Little Rock, Ark., where Hillary Clinton was a colleague. In July 1993 his body was found in Fort Marcy Park in Northern Virginia with a single gunshot wound to the mouth.

After three years, an investigation by independent counsel Robert Fiske concluded in June 1994 that Foster had committed suicide. That was the same conclusion reached by several other investigations, but Kavanaugh critics have accused the future justice of dabbling in the conspiracy theories that swirled after Foster's death.

In early 1995, however, Kavanaugh offered his boss, independent counsel Kenneth Starr, the legal rationale to broaden his Whitewater investigation to include the Foster death. Kavanaugh, then 30, argued that the possibility Foster might have been murdered gave Starr the right to delve more deeply.

“We are currently investigating Vincent Foster’s death to determine, among other things, whether he was murdered in violation of federal criminal law,” Kavanaugh wrote to Starr in a March 24, 1995 memo. “[I]t necessarily follows that we must have the authority to fully investigate Foster’s death.”

The new Foster inquiry, led by Kavanaugh, gave succor to conspiracy theorists, boosted Kavanaugh's reputation as a hard-charging Republican lawyer, and allowed Starr to continue investigating Bill Clinton, eventually leading him to the Monica Lewinsky scandal.

After a three-year investigation, Kavanaugh concluded in 1997 that Foster had indeed killed himself.

Bill Clinton argued in Las Vegas that all this meant Kavanaugh had no moral authority to complain about being hit with unsubstantiated sexual assault allegations from his high school days. Kavanaugh vehemently denied claims by Christine Blasey Ford stretching back to the early 1980s, when they both attended private high schools in the Maryland suburbs of Washington, D.C.

After days of angry Senate Judiciary Committee hearings that delved into Kavanaugh's personal life, he won confirmation to the Supreme Court by the narrowest margin since the 1880s.

Clinton said Kavanaugh's behavior harkened back to the notorious "red-baiting" lead lawyer and political adviser to Sen. Joe McCarthy, R-Wis., in the 1950s, Roy Cohn — who went on the represent Donald Trump in the 1970s and was known as a master of innuendo. Clinton said Trump and his family have "been doing that for decades in business and other contexts."

[ Also read: Hillary Clinton says Vladimir Putin is 'playing' Donald Trump]