A government shutdown is in the rearview mirror, but the outlines of a looming immigration deal remain murky with the sides still far apart — though the latest polling suggests President Trump’s bargaining position may be strong.

A Harvard-Harris poll taken in the run-up to the shutdown found Americans strongly support granting citizenship rights to illegal immigrant Dreamers. But they also back Mr. Trump’s three demands for a border wall, limits to the chain of family migration and an end to the Diversity Visa Lottery.

Most striking of all is the public’s demand for lower overall legal immigration — a position that has little traction on Capitol Hill but one that is overwhelmingly popular across the country.

The poll found that most Americans want annual legal immigration capped at 500,000 a year or less — far lower than the current annual rate of 1.3 million.

Those findings challenge what many lawmakers say is the bipartisan consensus on Capitol Hill that while illegal immigration is to be discouraged, high levels of legal immigration are necessary for the nation’s image and its economy.

That is one of the positions likely to be tested as Congress begins a sprint to find an immigration compromise, potentially by Feb. 8 — the deadline for spending set Monday — but definitely by March 5, which is when Dreamers could begin losing legal protections in large numbers.

“For the first time in five years, we will have a debate on the floor of the Senate on the Dream Act and immigration,” said Sen. Richard J. Durbin, Illinois Democrat.

Mr. Durbin has been leading the push for legalization and partnering with Sen. Lindsey Graham, South Carolina Republican, on the plan that has drawn the most attention.

The Graham-Durbin outline would grant eventual citizenship rights to the 690,000 Dreamers protected by Deferred Action for Childhood Arrivals and would include more than 1 million others who either didn’t apply for the Obama-era program or who were too old to qualify. The plan would also create legal protections, though not citizenship, for their parents.

The White House said it also is willing to talk about the broader immigrant population and more security and enforcement.

“If they’re willing to do the things we’ve asked to on visa, chain migration, border security, then we’re willing to consider a broader population, but we have not gone there,” Marc Short, the White House’s chief liaison to Congress, told reporters.

On the White House priorities, Mr. Graham and Mr. Durbin called for a 10 percent down payment on the Homeland Security Department’s $18 billion border wall proposal. Mr. Short said the White House needs more of a commitment to make sure future congresses don’t cut the money from the budget.

The Graham-Durbin plan did eliminate the Diversity Visa Lottery but recaptured those 50,000 annual visas and plowed them into a new amnesty program for would-be illegal immigrants from Haiti, El Salvador and other countries struck by natural disasters who have been living in the U.S. under special humanitarian protections for years.

Mr. Short said the White House was pleased that Mr. Graham and Mr. Durbin accepted the end of the visa lottery but that the administration does not want those visas used for another program.

That is likely to be a tough sell for Congress, where support for a high level of legal immigration spans both parties.

Indeed, on Monday Sen. John Cornyn, Texas Republican, emerged from a meeting with Mr. Trump to float the idea of using visas from both the lottery and chain migration and pumping them back into the system to reduce backlogs of people waiting to immigrate legally.

“We ought to reward them,” he said.

The public may see the issue differently, according to the Harvard-Harris poll of American adults, taken Jan. 17-19.

The survey asked respondents what level of overall legal immigration they would like to see.

A stunning 35 percent said the level should be fewer than 250,000 a year, while another 19 percent said it should be 250,000 to 500,000. Combined, they make up a majority looking for a cut of at least 50 percent over current annual levels. Another 18 percent said they want to see 500,000 to 1 million.

Just 19 percent of respondents said they want an increase over 1 million.

Mr. Trump hasn’t said recently what legal immigration number he wants to see, but he has been vocal on changing the way the U.S. picks immigrants. He said skills and ability to assimilate in the U.S. should be weighted over extended family ties.

The poll says voters agree by a 79 percent to 21 percent margin.

That is even bigger than the 77 percent to 23 percent margin that supports legalization for Dreamers.

More than 60 percent of voters said current border security is inadequate, and 54 percent said they support “building a combination of physical and electronic barriers across the U.S.-Mexico border.”

That could boost Mr. Trump’s call for a border wall system, which according to a proposal sent to Capitol Hill this month would build or revamp 722 miles of fencing along the border.