The GOP faces a challenge in its push to unseat Democratic Sen. Bob Casey.
Rep. Lou Barletta, who endorsed Trump's presidential campaign in March 2016, will face state Rep. Jim Christiana in Tuesday's Pennsylvania Republican Senate primary. The winner will get to face Casey, one of 10 Democratic senators seeking re-election in states Trump won in 2016. Casey, running unopposed Tuesday, is considered one of the safer senators in the group, as the president only narrowly won Pennsylvania.
Barletta, 62, has tried to channel Trump's immigration and economic rhetoric to capture the president's success in the purple state. But taking down Casey, a well-funded second-term senator, could prove difficult even with the president's support.
Barletta — who represents the state's 11th District in eastern Pennsylvania — will first have to get past Christiana this week. He appears to have a good chance of doing so.
Barletta raised about $3 million during the race, compared with about $275,000 for the state representative. Barletta has another factor going for him that GOP congressmen who fell short in bids for the Senate last week lacked: Trump has publicly supported him.
In a February tweet, Trump called Barletta "strong" and "smart" and noted he was one of the president's "very earliest supporters." He said the congressman voted for the GOP tax overhaul, "unlike Bob Casey."
Trump is pushing to give Barletta another boost before Tuesday, recording a robocall endorsing the congressman. It started going out Saturday and will get sent Monday, as well.
"Tuesday is Election Day, and I need you to go out and vote for my good friend, Lou Barletta, a very special guy," Trump said in a recording of the call, obtained by CNBC.
Earlier this month, Trump took another swing at Casey as he pushed gun rights supporters to elect more Republicans in the Senate to support his agenda. He criticized Casey, among other Democratic senators, for voting against his immigration priorities.
Barletta, who has served in Congress since 2011, was pledging to crack down on immigration well before Trump started running for president. He has taken a hard line since he served as mayor of Hazleton, Pa., in the early 2000s. He put rules in place to financially punish landlords who house undocumented people or businesses who employ them.
Barletta has supported GOP efforts to defund so-called sanctuary cities — a push both he and Trump have criticized Casey for opposing.
The congressman has also touted his support for the GOP tax overhaul. Barletta has criticized free-trade deals like the Trans-Pacific Partnership — but voted along with many Republicans in 2015 to give President Barack Obama fast-track authority to negotiate the agreement.
Christiana, who represents a western Pennsylvania district in the state House, contends both Barletta and Casey have had their chance in Washington and failed. He has argued for fiscal restraint and criticized both lawmakers for supporting the massive omnibus spending bill to fund the government through September. Trump signed the spending bill into law in March, despite threatening to veto it.
Though appealing to voters as an outsiders sometimes works in elections, Christiana appears to be an underdog heading into Tuesday.
Regardless of who emerges from the GOP primary Tuesday, the Republican will face a tough task in taking down Casey. The senator had a massive fundraising advantage late last month, with nearly $10 million on hand versus about $1.3 million and $16,000 for Barletta and Christiana, respectively.
It means national Republican groups could have to decide whether to help Barletta keep up with Casey or spend their resources in competitive races elsewhere around the country.
Polling in the general election race is limited so far, but surveys suggest a comfortable lead for Casey. A Muhlenberg College poll found Casey had a 16-percentage-point edge over Barletta in a hypothetical matchup, and a 19-percentage point advantage over Christiana.
Many Democrats running in states Trump won in 2016 have voted with the president around half the time or more. Some do not want to run afoul of potential voters who support the president.
Running in a swing state where a plurality of voters disapprove of Trump, according to most surveys, Casey has not faced as much of a dilemma. Pennsylvania voters' leanings often shift between elections — Obama won Pennsylvania in both 2008 and 2012.
Casey has voted in line with Trump's position only 30 percent of the time — less than expected based on his state's partisan leanings, according to FiveThirtyEight.
"No matter what President Trump, Mitch McConnell or D.C. special interests throw at him, Senator Casey won't back down from the fight to eliminate the policies that stack the deck against Pennsylvania's middle class," Casey campaign spokesman Max Steele said in a statement.
In one significant sign of his efforts to buck Trump, Casey joined numerous Senate Democrats from blue states in calling on Trump to resign in December. They argued the president should step down because of more than a dozen sexual misconduct accusations against him. Trump has denied those allegations.
In winning the White House in 2016, Trump partly appealed to Rust Belt voters with pledges to revise or scrap free trade deals and revive manufacturing jobs. On that issue at least, he will have a hard time getting leverage over Casey.
In 2015, the senator opposed giving Obama fast-track negotiating authority on the TPP, the deal Trump abandoned as one of his first acts in office. Casey, along with other Democrats running this year, such as Sen. Sherrod Brown of Ohio, have supported Trump's proposed tariffs on imports of goods such as steel and aluminum.
"I'm happy to see action being taken," Casey told Politico in March, adding it "doesn't happen that often" that he agrees with the president.
Graphic by CNBC's John Schoen