Sen. Lindsey O. Graham (R-S.C.). (Jabin Botsford/The Washington Post)

Sen. Lindsey O. Graham (R-S.C.) kicked off his reelection campaign here over the weekend by having Vice President Pence — perhaps President Trump’s most loyal ally — underscore his own loyalty to the president.

“I have watched him stand in solidarity with President Trump and our administration,” Pence said Saturday at a beachfront hotel.

Earlier, Graham assured the more than 700 attendees — many of them wearing red “Make America Great Again” hats — that his “number one” priority is Trump’s reelection.

“I’m going to be a good ally to this president and be his partner,” he said.

Twenty months before voters head to the polls, Graham is starting his campaign for a fourth Senate term early — and doing everything he can to link himself to the president.

For Graham, the full embrace of Trump is, in part, an effort to stave off primary challengers, particularly someone who could be tempted to run against him as a Trump-style insurgent.

It is also a sign that Graham wants to energize Trump’s core voters in this traditionally red state, as Democrats try to build on their recent gains. Democrats scored a victory in November in South Carolina’s 1st Congressional District — a district won by Trump by more than 13 points in 2016.

Jaime Harrison, the first black chairman of the state Democratic Party and a former aide to Rep. James E. Clyburn (D-S.C.), is exploring a Senate run and has been encouraged by national party leaders. Harrison’s campaign would probably attract significant attention from the Democratic presidential primary contenders making frequent stops in South Carolina, an early voting state.

“Lindsey understands that this is not a slam dunk for him,” Harrison said in an interview Sunday. “The refrain these days is: What’s happened to Lindsey? He’s won in the past with a coalition of country club Republicans, independents and some moderate or conservative Democrats. But he’s lost some of those middle-of-the-road voters.”

As Pence’s motorcade traveled through small towns, with Graham riding along, it was greeted by small crowds waving American flags. There were scattered groups of protesters, too, holding posters urging Attorney General William P. Barr to release special counsel Robert S. Mueller III’s complete report on Russian interference in the 2016 campaign and Trump’s conduct.

But before Graham turns to the general election, he is focused on shoring up his Republican support — and locking down his party’s nomination.

While Graham is close with Trump and a regular golf partner to the president, he was a once a sharp-tongued critic. He also has a long history of irritating conservatives with his independent streak and his attempts to pass bipartisan immigration legislation with his friend John McCain, the late senator from Arizona.

In 2014, Graham faced six lesser-known Republican challengers in his Senate primary race but ultimately won comfortably in a year where the tea party movement failed to score many upsets.

By enlisting Pence for his campaign’s launch — and promising his supporters this weekend that Trump will come to stump for him later this year — Graham is aiming to scare off any potential rivals.

A Winthrop University poll released in March showed Graham with 74 percent approval rating among state Republicans — up from 51 percent a year ago.

The crowd for Graham at the Embassy Suites in Myrtle Beach was a microcosm of Trump’s events in the South: Older and white, veering from Republicans in navy blazers to activists in T-shirts.

Even their soundtracks aligned: Graham’s campaign played “Sympathy for the Devil” by the Rolling Stones, followed by a soaring opera song — a playlist similar to the one at Trump’s arena rallies.

Later Saturday, Pence and Graham flew together on Air Force Two to Greenville, S.C., joined by Gov. Henry McMaster (R-S.C.), another avowed Trump ally, to speak at a Baptist church in the area.

It went unmentioned, but Greenville is the political base of businessman and Marine veteran John Warren, who has mused about a possible bid against Graham. Warren won 46 percent of the vote last year in a much-watched Republican gubernatorial primary runoff election against McMaster.

To fend off Warren — who built a competitive campaign and railed against the governor as an insider — McMaster had Trump hold a rally for him on the eve of the runoff. Trump personalized the contest and warned his voters to not give “Donald Trump a humiliating defeat.”

Warren has gone quiet about a 2020 Senate run as Graham has coupled his political identity with Trump, but he pointedly told a conservative outlet last year that the state has only one conservative senator — Sen. Tim Scott (R) — making him the most formidable of any looming foils.

After thanking the swaying, green-robed choir at Brushy Creek Baptist Church, Graham acknowledged Saturday that “me and the president didn’t get started on the best foot.”

Still, Graham joked, “I found common ground with President Trump: I like him and he likes him. It seems to be working out for the both of us.”

In a nod to South Carolina’s influential evangelical Christian community and Pence’s standing with them, Graham showered praise on Pence, saying he “reflects who we are in South Carolina as well as anyone I’ve met in politics” and “walks in the shadow of a gracious and living God.”

Pence, far more formal in his delivery than the wisecracking senator, told the churchgoers that Graham was a powerful ally for Trump in Washington — a “tremendous partner” in bolstering the U.S. relationship with Israel and in confirming conservatives appointed to the federal courts.

“Now he is the chairman of the Senate Judiciary Committee,” Pence said approvingly, as the crowd applauded.

Pence added, “America will never forget the force of the words of Senator Graham during the Kavanaugh hearings” — a reference to Graham’s charged remarks last year during the hearings for Justice Brett M. Kavanaugh, who was facing accusations of sexual assault and was defended by Graham.

Graham has since made a snapshot of him and Kavanaugh his profile picture on Twitter, yet another reminder to Trump enthusiasts that he has been in the political trenches with the president on the biggest battles — and remains there — regardless of the past.

“If you’re going to beat us, you better get up early, you better stay late and you better pack a punch,” Graham said at the church.

Harrison, however, contends Graham’s unwavering loyalty to Trump may help him ahead of a primary race, but eventually be a burden.

“The winds of change are blowing,” Harrison said. “Lindsey has forgotten about South Carolina and is spending too much time on Fox News talking with Sean Hannity. He should go get a contract instead.”