WASHINGTON — President Donald Trump appears to be taking a more positive view of Capitol Hill talks on border security, according to negotiators who struck a distinctly optimistic tone after a White House meeting with a top Republican on the broad parameters of a potential bipartisan agreement.

Senate Appropriations Committee Chairman Richard Shelby of Alabama said Thursday's session in the Oval Office was "the most positive meeting I've had in a long time" and that the president was "very reasonable."

Down Pennsylvania Avenue at the Capitol, the mood among negotiators was distinctly upbeat, with participants in the talks between the Democratic-controlled House and GOP-held Senate predicting a deal could come as early as this weekend.

There's a Feb. 15 deadline to enact the measure or a stopgap spending bill to avert another partial government shutdown, which neither side wants to reprise. Republicans are especially eager to avoid another shutdown after they got scalded by the last one.

Trump had previously called the talks a "waste of time," and he's threatened to declare a national emergency to bypass Congress and build a wall on the U.S.-Mexico border. But Shelby said Trump during their meeting "urged me to get to yes" on an agreement.

Publicly on Thursday Trump took a wait-and-see approach.

"I certainly hear that they are working on something and both sides are moving along," Trump said. "We'll see what happens. We need border security. We have to have it, it's not an option. Let's see what happens."

The White House is committed to letting the negotiations play out, with some saying they are "cautiously optimistic" about getting a deal they could live with, said a senior administration official who lacked authorization to publicly discuss internal deliberations and spoke on condition of anonymity.

The new openness comes after Trump delivered a well-received State of the Union speech in which he preached the value of bipartisanship.

Despite the newfound optimism, Trump continues to threaten to declare a national emergency to circumvent Congress if lawmakers fail to reach a deal he can stomach.

Still, Sen. Lindsay Graham, R-S.C., a close ally of Trump, said Thursday that the deal could be a good starting place — suggesting Trump could take additional action if needed to secure more wall funding without congressional approval.

"I would recommend that this will probably be a good down payment and what else is lacking, the delta between what you want and what you get, there are other ways to do it, and I expect the president to go it alone in some fashion," Graham told reporters.

Shelby said he and Trump didn't discuss whether Trump still might use an emergency declaration even if there's a deal, saying: "The president's got constitutional powers. … I would think he wouldn't, but I don't know what the situation" will be.

Beyond the border security negotiations, the measure is likely to contain seven appropriations bills funding domestic agencies and the foreign aid budget, as well as disaster aid for victims of last year's hurricanes and western wildfires.

Any move by Trump to fund a border barrier by executive fiat would roil many Republicans on Capitol Hill, raising the likelihood that both House and Senate could pass legislation to reverse him. Trump could veto any such measure, but he's also certain to face a challenge in the courts.

A key negotiator, Sen. Dick Durbin, D-Ill., said details on nettlesome border wall issues haven't been worked out. Sen. Roy Blunt, R-Mo., another participant, said both sides are showing flexibility, including Democrats who insisted during the recently ended 35-day shutdown on no wall funding at all.

Rep. Lucille Roybal-Allard, D-Calif., another negotiator, acknowledged that Democrats could possibly lose votes on any final deal and that it's "unrealistic" to think there would be no funding at all for any physical barriers.