WASHINGTON – President Donald Trump signaled optimism Thursday about the progress of congressional talks on border security, just a week after telling Republicans they were wasting their time trying to negotiate a deal with Democrats.

"We'll see what happens, but I certainly hear they're working on something, and both sides are moving along," Trump told reporters at the White House. "We'll see what happens. We need border security. We have to have it. It's not an option. Let's see what happens."

Trump’s remarks are the latest sign that negotiations are progressing as lawmakers try to hammer out a deal before a Feb. 15 deadline to avert another government shutdown.

Earlier Thursday, a key Republican senator involved in the ongoing negotiations said Trump might be willing to sign a compromise to help avoid a shutdown.

Alabama Sen. Richard Shelby, chairman of the Senate Appropriations Committee and a member of the conference committee negotiating a compromise on border security, met with Trump and Vice President Mike Pence at the White House Thursday.

Afterward, Shelby told reporters Trump seemed open to signing a compromise on border security.

“I think he would, and I think he’s looking to keep the government open,” Shelby said.

Shelby called the meeting “positive” and said Trump urged lawmakers to wrap up the discussions.

“We all know things change, but I think right now we’re on an upward, positive course of discussions,” he said.

Trump has demanded $5.7 billion for a wall along the U.S.-Mexico border. Democrats have refused to give him the money, saying a border wall would be costly and ineffective.

The standoff led to a 35-day partial government shutdown, the longest in history.

The 17-member committee, which includes Democrats and Republicans from both the House and the Senate, is working to negotiate a compromise and hoping to reach a deal by Monday.

Late last month, Trump tweeted that Republicans are “wasting their time” trying to negotiate a border security deal and that "Democrats, despite all of the evidence, proof and Caravans coming, are not going to give money to build the DESPERATELY needed WALL."

More:Donald Trump's power dynamic with Nancy Pelosi will be on full display at the State of the Union

More:Trump may build a 'human wall.' Wait, what?