WASHINGTON — With only days to go until the first votes are cast in the Democratic presidential contest, President Donald Trump’s re-election campaign is pivoting its primary strategy to aggressively target Sen. Bernie Sanders, criticizing his record and platform while also raising questions about his treatment by the Democratic Party.

And Sanders's campaign is just fine with the attention, believing it only reinforces an electability argument it has struggled to sell all year.

The shift on the Trump camp's part is an attempt to further elevate the Vermont independent as he surges in national and early-state polls and to fuel divisions within the Democratic Party as other contenders escalate their attacks on Sanders. It’s a familiar tactic for the Trump campaign, which has similarly taken on former Vice President Joe Biden and Sen. Elizabeth Warren of Massachusetts at moments when each were on the rise.

Over the last three weeks, the Trump re-election effort has focused on Sanders more intensely than on the rest of the pack. And it goes further than just the president's public tweets, including dedicated press releases, surrogate talking points and rally shout-outs.

Outwardly, the Trump campaign maintains it has “no preference” for who its general election rival is, but Sanders’ criticism of the president after the killing of Iranian Gen. Qassem Soleimani this month provided an opening for a new and sustained attack on the senator.

Vice President Mike Pence specifically singled out Sanders in his introductory remarks at a Trump campaign rally in Milwaukee last week, a treatment recently reserved for the Democratic front-runner in the national polls, former Vice President Joe Biden.

“Bernie Sanders even called the president's decision to bring down that man to justice ‘assassinating a government official.’ Well, I got news for Bernie Sanders: Soleimani was not some government official, he was a terrorist. And President Trump was right to take him down,” Pence said to cheers.

Trump has often called him “Crazy Bernie,” but has now taken to saying: “Bernie is surging, Bernie is surging!” He cryptically tweeted recently that the Vermont senator was “looking very good against his opponents in the Do Nothing Party. So what does this all mean? Stay tuned!”

In recent days, senior campaign officials and Trump allies have continued to bash Sanders by accusing him of leading a “socialist government takeover.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

At the same time, they have also resurrected the unproven theory that a Democratic Party “fix" is working against Sanders, a claim the president has made as well since Sanders finished second to Hillary Clinton in the 2016 primary race.

“Crooked Hillary can't even close the deal with Bernie — and the Dems have it rigged in favor of Hillary. Four more years of this? No way!” Trump tweeted ahead of his general election face-off with Clinton in the last cycle.

This week, he again claimed: “They are taking the nomination away from Bernie for second time. Rigged!”

And, in a Washington Post op-ed Thursday, Trump counselor and 2016 campaign manager Kellyanne Conway wrote: "If Democrats were serious about electability, they’d nominate the guy who actually won primary contests and proved he can play David to Goliath in key places four short years ago. Sanders bested Clinton in 22 states in 2016, including battlegrounds such as Michigan, Wisconsin and Minnesota, while earning more than 13 million votes and 1,800 delegates."

The president’s allies often point out that he is the main driver of the campaign's tactical shifts, given how closely Trump follows changes in the polls. After seeing Sanders’ recent numbers grow in Iowa and New Hampshire, top aides discussed changing their strategy to highlight him more, according to two people familiar with the conversations.

At his last two rallies, Trump has mentioned “Bernie” about 10 times, more than Biden, Warren or Pete Buttigieg, the former mayor of South Bend, Indiana, who has also been near the top of polls in Iowa.

Still, senior campaign officials argue this was about highlighting the potential “dangers” of a Sanders presidency and less about his rise in the crowded field of Democrats. “We focused on him over the course of the last few weeks because he revealed himself to be dangerous as a potential commander-in-chief. That’s why we highlighted him,” said Trump campaign spokesman, Tim Murtaugh.

For its part, the Sanders campaign sees the newfound attention from the Trump team as recognition of its polling success.

Since the start of the campaign, Sanders' aides have used a combination of grassroots appeal and hypothetical polling matchups to make a broader point about the senator's electability. For them, "Bernie Beats Trump" is not just a routine rally chant and campaign button; it is central to his appeal to Democratic voters concerned that Sanders' uber-progressive policies could be an insurmountable challenge in the general election.

Sanders topped Biden in a national CNN poll this week (27 percent to 24 percent), but only 24 percent of respondents said Sanders had "the best chance to defeat Trump," while 45 percent said so of Biden.

“To quote Brad Parscale who was on CBS yesterday, ‘Bernie is on the rise,’ and so they noted it, they have observed it, and they are now commenting on it,” Sanders campaign manager Faiz Shakir said Thursday in an interview with NBC News. (Parscale is Trump's campaign manager.)

“I see them clearly trying to home their sights on Bernie, and they’ve done more comments, tweets and research peddling on him, and I don’t see anything sticking,” Shakir continued.

In fact, the Sanders team believes it’s helping — especially as the candidate is sidelined from the campaign trail, sitting silently on the Senate floor during Trump's impeachment trial.

Thursday, Sanders shifted his fire on the issue of Social Security from Biden to Trump after the president weighed in on an issue by tweeting: "Democrats are going to destroy your Social Security. I have totally left it alone, as promised, and will save it!"

“More lies,” Sanders quickly responded with an image of a headline highlighting proposed cuts to Medicaid, Social Security and Medicare in Trump’s 2020 budget.

The Sanders campaign has pointed out that its tweets in direct response to the president sometimes outperform his original posts. After Trump sent his “stay tuned!” missive about Sanders and his climb in the polls, the senator shot back with: “It means you’re going to lose.”

The reply earned nearly 1 million likes and six times the retweets as the president’s initial message.