Republicans hold a narrow edge over Democrats when it comes to trust on immigration, the topic at the center of the latest shutdown crisis in Washington.

A new Hill-HarrisX poll finds that Republicans are trusted by 42 percent of voters on the issue, while 40 percent trust Democrats on immigration.

The difference is within the poll's 3.1 sampling margin of error and suggests both parties have reason to think the public is behind them in the current debate.

Parts of the government will shut down if a new funding bill is not approved by Feb. 15. Democrats and the White House are battling over President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE's demand for a border wall, as well as funding for detention beds used by Immigration Customs Enforcement to detain people.

While voters are split over which party they trust on immigration, the Feb. 9-10 survey of 1,003 registered voters found that both Democrats and Republicans enjoy much larger margins of support on a host of other issues.

In the latest survey of registered voters, the public strongly preferred Democrats on the environment (54-25 percent), poverty (49-28 percent), education (47-31 percent), and healthcare (46-34 percent).

At the same time, the poll found that Republicans were significantly more trusted on the issues of homeland security, taxes, and regulations, where voters prefer the party over Democrats, 45 to 34 percent.

The GOP has a smaller lead on the issue of the economy (42-38 percent) and foreign policy (41 to 38 percent).

The poll's finding of a close contest on immigration is similar to a survey taken toward the end of the last partial government shutdown.

In a Washington Post-ABC News poll taken Jan. 21-24 among 1,001 adults, Democrats were trusted by 42 percent while Republicans were trusted by 40 percent.

While the public has consistently opposed Trump's proposal to build a wall between the United States and Mexico, Trump's associating himself with strong immigration enforcement generally could be helpful to him for people concerned with the issue, irrespective of whether they support a border barrier.

"If you ask voters do they support a border wall, I think the majority has consistently said that they oppose that. But when you think of immigration as sort of a broader issue, then voters are thinking about illegal immigration, border security, they're thinking about all of those several horror stories that President Trump loves to tell," Pia Nargundkar, a senior associate at the Democratic consulting firm ALG Research, said on during a Monday panel discussion featured on "What America's Thinking," Hill.TV's show about public opinion and polling.

"This is one of those things that bounces back and forth and this just shows it's one of the issues our country is so divided on and really kind of stuck in on both sides," said Conor Maguire, a senior strategist with the GOP campaign firm WPA Intelligence said. "You've got a few people in the middle that will make decisions back and forth as different things happen in the news. Whenever something happens publicly, that's when kind of those people that swing, move back and forth, start paying attention and then kind of pick the side where they are."

—Matthew Sheffield