FLEMINGTON, N.J. — Across the country, suburban GOP congressional candidates this fall have had to make a high-stakes decision: whether to run on President Donald Trump's immigration policies — or run away from them.

In New Jersey, two Republicans in strikingly similar districts have bet their political futures on sharply different answers. GOP Rep. Leonard Lance is distancing himself from President Donald Trump on immigration. Jay Webber, the Republican nominee in a neighboring and virtually identical New Jersey district, is sticking close.

Lance, now in his fifth term representing the 7th District, is among the most vulnerable incumbents in the country in a year in which control of the House is up for grabs. His race is rated as a "tossup" by the Cook Political Report, and Democrat Hillary Clinton won the district 48.6 percent to Trump's 47.5 percent in the 2016 presidential election.

Lance has put some distance between himself the president on immigration. Jeenah Moon / for NBC News

Webber, running for the 11th District seat left open by retiring Republican Rep. Rodney Frelinghuysen, has a more uphill battle, even though Trump won the district by a percentage point. Cook rates his race against Navy veteran and former federal prosecutor Mikie Sherrill as "leans Democrat."

The different tacks of these two Republicans running in two of the most competitive districts in the nation underscore the degree to which Trump's immigration rhetoric and policies have pushed the issue to the front-burner of the American political debate and highlighted the divide between GOP base voters and the rest of the electorate.

"They’re in a pickle," said Deborah Schildkraut, a political science professor at Tufts University in Boston of the the dilemma facing Republicans on the ballot this fall. "The decision is either run on the Trump line on immigration or run on the more centrist Republican line on immigration, and I don’t think It’s obvious which one is the winning strategy."

There's no denying the topic is on Americans' minds this election year: Over the summer, immigration remained solidly perched at or near the top of the lists of issues voters cited as their top priority in a string of surveys.

It has riven the Republican Party, separating political and business elites, who tend to favor centrist immigration policy, from the party's base. Trump's nomination in 2016 — and the defeat of Republicans with more moderate stances on immigration — helped highlight that the majority of GOP primary voters like his approach.

For example, a May CBS News poll showed that 59 percent of American adults opposed building a wall along the U.S. border with Mexico, a figure that has been consistent with more recent polls by NBC and others. But the CBS survey also found that 78 percent of Republicans favored the wall, compared with 13 percent of Democrats and 34 percent of independents.

Therein lies the rub: While most Republican activists across the country like what Trump's doing on immigration, that's not true of the electorate as a whole. That means, like Lance and Webber, Republicans in swing districts across the country have to make a tough calculation that could determine whether they win or lose.

Trump is deeply unpopular in New Jersey, with just 33 percent approval and 63 percent disapproval in a recent Quinnipiac poll — so it may come as little surprise that a Republican running in a competitive district would strike a different tone on his core issue, whether they embrace a majority of his immigration positions or not.

Lance supports providing a pathway to citizenship for undocumented immigrants currently in the country, he bucked Republican leaders in the House by signing a "discharge petition" to force a vote on extending President Barack Obama's "DACA" program, and he's the only Republican cosponsor of a bill introduced by Rep. Brendan Boyle, D-Pa., that would require the Trump administration to reunite families separated at the U.S.-Mexico border.

"I believe my views are the views of the majority of the people of the United States and certainly of the people I represent," Lance said in a telephone interview with NBC News in which he was quick to note his differences with Trump not only on immigration but also on taxes and other matters.

His constituents here in the 7th District, a swath of suburbs sandwiched between the New York metropolitan area and the Pennsylvania border, are wealthy, well-educated and predominantly white, many of Irish, Italian and German descent. The median household income is near twice the national mark at $107,000, more than half the population has at least a bachelor's degree, compared with about one-third nationally. Rough 8 in 10 are white, with Latinos and Asians accounting for most of the rest.

And yet in the adjoining 11th District — where 82 percent are white, the median household income is $108,000 and 54 percent hold a college degree — Webber has taken a far different approach.

Webber has echoed President Trump's immigration attacks. Jeenah Moon / for NBC News

"I agree with a lot of what the president has said about immigration," Webber said in a telephone interview, though he added that he thought the family separation policy "was wrong and he was right to correct it."

Trump, Lance and Webber do strike some common notes on immigration: They're all willing to accuse Democrats of going too far to defend undocumented immigrants, and Lance voted for a more moderate House GOP immigration bill that Trump tepidly endorsed behind closed doors and criticized publicly.

Webber has more closely mirrored one of the president's top attacks, falsely accusing Sherrill of wanting to abolish the Immigration and Customs Enforcement agency. While some progressives have adopted that position, Sherrill has said she does not want to get rid of the bureau. "She's trying to have it both ways," Webber told NBC, because she has appeared with Gov. Phil Murphy, a Democrat who has promised to make New Jersey a "sanctuary state."

And despite his more moderate stance on the issue, Lance has zeroed in on his opponent Tom Malinowski's support for focusing deportation efforts on undocumented immigrants who have committed crimes beyond crossing the border without authorization.

In both districts, as is the case in swing districts across the country, immigration has grabbed the attention of voters whose Election Day decisions could help swing the balance of power in Washington.

Some, like Webber, say they support the president's overall approach. Karen Shampanore, who describes herself as a political independent from a conservative family, hasn't made up her mind about who she will vote for in the midterms. But the unemployed 48-year-old from Glen Gardner in Lance's 7th District, is certain that she's with Trump on immigration, and tired of hearing him criticized on the issue. In part, that's because she believes undocumented immigrants are doing economic harm to American citizens even though the unemployment rate in her home county of Hunterdon has been below 4 percent for nearly two years.

"They're taking a lot of our jobs and services away from us," Shampanore said. "I feel like if they can survive here, they can survive where they came from."

The president, she said, is "doing what he can do, so you don't mock someone who's trying, because he's got a lot of people to protect."

James McQueen, of nearby Flemington, left the Democratic Party over immigration.

"We need strong borders, I believe we need a wall," the 40-year-old resident of Flemington in Lance's 7th District, said in an interview with NBC News. He said he is "100 percent for" Trump's handling of immigration, including the suspended policy of separating families at the border to discourage illegal migration.

"We're trying to figure out who the families are," he said, explaining that he believes some of the kids coming across the border are being exploited by adults who falsely claim to be their parents and may be involved in human trafficking. "There has to be separation."

Others who sympathize with the president's position are uneasy with some elements of his administration's approach.

"I don't think the families should be separated," said 68-year-old Jack Ketcherick, a retired builder from Parsipanny in the 11th District. "But [immigration] should be controlled before that happens."

Nonetheless, he's otherwise behind the president. He voted for Webber in the Republican primary and says he will do so again in November.

In his view, Democrats are "too lenient" on immigration, and Republican candidates should work with the president as the leader of the party.

"If they are Republicans, they should support him," Ketcherick said. "But they may be uncomfortable because he's unusual."

In fact, some area voters are more than a bit uncomfortable: Trump's policies are "frightening," said Janet Siegel, the owner of an architecture firm in Chatham, adding that the separation push was "inhumane."

Siegel, 55, who was previously unregistered in a party, enrolled as a Democrat for the first time so that she could vote for Sherrill in the party primary this year.

"I think it has to be handled in some way, a humane way, and the president hasn't done that," she said. "That's why we need people in Congress who have a brain."

Michael Steele, former chairman of the Republican National Committee, said GOP candidates in competitive districts have to perform a "sweet spot dance" to appeal to swing voters without alienating the president's political base.

"It tends to be a little bit trickier for candidates that are not buying what Donald Trump is selling but a portion of their base vote, or voters in their district, does," he said. "That’s going to be an interesting thing to watch — how effective they are in doing it."