WASHINGTON — President Donald Trump’s views on immigration and building a wall along the Mexico border have evolved since his presidential campaign, White House chief of staff John Kelly said Wednesday.

Those changes are giving some people hope that a compromise with Congress on the thorny issue is possible. But they are perplexing others — even as the clock ticks down to a showdown.

Kelly made the comments Wednesday at a closed-door meeting with members of the Congressional Hispanic Caucus, participants say, and made similar remarks later on Fox News Channel. They came amid a shaky effort to craft an accord protecting hundreds of thousands of young immigrants from deportation — a push the White House and Republicans say they would back if it’s coupled with tough border security measures and other restrictions.

Kelly said on Fox that he told the Congressional Hispanic Caucus that “they all say things during the course of campaigns that may or may not be fully informed.”

He said Trump has “very definitely changed his attitude” toward protecting the young immigrants, “and even the wall, once we briefed him.”

“So he has evolved in the way he’s looked at things,” Kelly said. “Campaign to governing are two different things and this president has been very, very flexible in terms of what is within the realms of the possible.”

Kelly’s comments were noteworthy because they openly acknowledged the difference between campaign promises and governing, and even suggested that Trump needed to be educated on the subject. They also come as lawmakers struggle to reach a bipartisan deal protecting “Dreamers” — around 800,000 people who arrived in the U.S. illegally as children and could be deported without legal protections. Part of negotiators’ problem has been uncertainty over what Trump would accept.

“He’s not yet indicated what measure he’s willing to sign,” Senate Majority Leader Mitch McConnell, R-Ky., told reporters Wednesday. “As soon as we figure out what he is for, then I will be convinced that we would not just be spinning our wheels going to this issue on the floor.”

Some lawmakers who met with Kelly on Wednesday recalled his remarks differently.

“He specifically said that there’s some areas of the border that didn’t need the wall, and that the president didn’t know that when he was making his campaign promises,” Rep. Ruben Gallego, D-Ariz., said in a brief interview.

Another lawmaker, Rep. Luis Gutierrez, D-Ill., said Kelly told them that “there were statements made about the wall that were not informed statements. In other words, I’ve informed the president of what it takes to build a wall, so here’s how we’re going to do it. That’s what I understood, and all of that was helpful.”

Many Democrats have said that without an immigration deal in sight, they’ll vote against a Republican bill preventing a weekend government shutdown. Congressional passage must come by Friday to prevent an election-year shuttering of federal agencies that could be damaging to both parties.

During his presidential campaign, Trump made it a mantra to promise to build a “beautiful” wall that would be paid for by Mexico.

Since then, White House officials have repeatedly said it doesn’t have to be a concrete wall from coast to coast but could include large stretches of fencing, technology or other systems. Trump also now wants Congress to provide taxpayer money to finance it.

One White House official said Wednesday that Kelly’s suggestion that Trump’s positions had evolved was inartful, and maintained Trump is still committed to his immigration priorities.

Trump ended the legal shields on “Dreamers” last year and gave Congress until March to renew them.

Last week, he rejected a compromise by three Democratic and three Republican senators to restore those protections, a deal that included money to begin building the wall and other security steps. Trump’s rejection angered the bargainers, and partisan feelings worsened after participants in a White House meeting last week said Trump had referred to African nations as “shitholes.”

Another group of high-level lawmakers has also started talks aimed at brokering an immigration deal, adding an additional level of uncertainty.

Kelly said on Fox that “there’s no doubt in my mind there’s going to be a deal” protecting the Dreamers.

Meanwhile, Senate Minority Leader Chuck Schumer, D-N.Y., said there’s “very, very strong” sentiment among Democrats in the chamber to oppose GOP-drafted legislation to keep the government’s doors open.

His comments underscored the problems GOP leaders face in winning congressional passage of that legislation. The bill would keep agencies open until mid-February and finance a popular children’s health insurance program for a year.

Democrats’ votes are needed to advance the stopgap measure through the Senate. It’s even unclear whether GOP leaders have nailed down enough votes to prevail in the House, where conservatives and strong boosters of the Pentagon have been unhappy.

Conservative leader Rep. Mark Meadows, R-N.C., said he wants GOP leaders to add additional defense money. But he said he was pessimistic leaders would grant other conservative-backed ideas, such as the promise of a vote on a more conservative immigration bill authored by Judiciary Committee Chairman Robert Goodlatte, R-Va.

Associated Press writers Jill Colvin, Zeke Miller, Kevin Freking and Marcy Gordon contributed to this report.