CHESTERFIELD, Mo. — Senator Lindsey Graham’s bipartisan overtures — on immigration, foreign policy, even investigations of President Trump — once made him a darling of Democrats, a Republican dealmaker to be wooed to the center.

But when the South Carolina Republican turned up in this St. Louis suburb to campaign against a Democratic colleague, Claire McCaskill, the crowd of Trump-loving women and red-hatted men practically swooned, bathing in the reflected glow of the president they adore — who now adores Lindsey Graham.

Mr. Graham, crisscrossing the country to turn out the Republican vote against the centrist Democratic senators who were once his natural allies, lapped it up. He has been basking in the exaltation of Trump backers ever since his lacerating defense of Justice Brett M. Kavanaugh. His own transformation from Trump-basher to Trump defender seems complete.

Gone is the senator who once called the future president “the world’s biggest jackass” and a “race-baiting xenophobic religious bigot.” With an eye toward re-election in 2020 in a state still on the Trump Train, Mr. Graham has climbed into the locomotive.