Senator Lindsey Graham, the blunt-speaking South Carolina Republican, vented to reporters on Thursday outside the hearing room where the Senate Judiciary Committee was hearing explosive testimony about sexual assault allegations against Judge Brett M. Kavanaugh, President Trump’s embattled Supreme Court nominee.

Then he went back inside and really let loose.

“What you want to do is destroy this guy’s life, hold this seat open and hope you win in 2020,” Mr. Graham, red-faced and dropping all pretenses of legislative comity, yelled at his Democratic colleagues. “This is the most unethical sham since I’ve been in politics.”

With those words, Mr. Graham all but cemented a slow-motion public political transformation over the past two years — from an anti-Trump, maverick Republican senator who often sought legislative compromise to Mr. Trump’s closest ally and most ardent defender.

As one of Mr. Trump’s rivals for the presidency in 2016, Mr. Graham called him “the world’s biggest jackass,” a “race-baiting xenophobic religious bigot” and a “kook” unfit to be president. For his part, Mr. Trump responded by calling Mr. Graham “an idiot” and “not as bright, honestly, as Rick Perry.”