Massachusetts Republicans in Tuesday’s primary chose state Rep. Geoff Diehl, one of President Trump’s most steadfast supporters, to challenge Democratic Sen. Elizabeth Warren — one of Trump’s favorite targets of derision — in November.

The GOP primary featured a snapshot of the national party’s Trump spectrum: Diehl co-chaired Trump’s 2016 campaign in the state and has vigorously defended him; Republican political operative Beth Lindstrom said she had “distanced” herself from Trump due to his inflammatory comments about race but she would still vote for his reelection; and businessman John Kingston, who backed Republican efforts to block Trump’s nomination in 2016, promised during the campaign to “restore civility” in politics.

Diehl won the party’s endorsement at the state convention in April but President Trump never weighed in on the race. However, Trump routinely singles out Warren on Twitter and in speeches, referring to her as “Pocahontas,” a jab at her discredited decades-old claim of Native American heritage.

In his victory speech, Diehl turned quickly from his primary victory to his next challenge — the general election. Warren has said she’s not running for president in 2020, but Diehl said he doesn’t believe her.

“Sen. Warren has failed us," he said. "She’s not interested in Massachusetts. You know it. She’s looked right past us and the issues we care about. We clearly can not depend on her when her focus is always on her political future.”

Diehl also criticized Warren for vowing to undo the tax cuts that he says has led to the economic boom.

"We've got issues like making sure we secure our borders so that we don't have problems here in Massachusetts with illegal immigration, with sanctuary cities," he added. "We got to make sure we continue with the economy on a roll that it's on.”

Beating Warren, who agreed to three debates, may be a hard road for Diehl. She is popular in the state, has a huge national following, is considered a potential Democratic presidential contender for 2020 and as of mid-August she had more than $15 million in her campaign war chest. None of the three GOP candidates had raised more than $2 million for the primary as of two weeks ago, though Kingston loaned his campaign nearly $5 million. Diehl had less than $200,000 in cash remaining by Aug. 18, according to Federal Election Commission reports.

But in the runup to November, Diehl will be able to fundraise nationally as the conservative foil to Warren, and he will almost certainly have the president on his side. And unlike some other Republican candidates, he will be eager for any opportunity to stand with Trump.

Reporter Craig LeMoult contributed to this article.