House Speaker Paul Ryan said Republicans will rewrite a last-minute spending bill to include President Trump's demand for border security funding after Trump told them he wouldn't sign the bill without that money.

“We just had a very long, productive meeting with the president. The president informed us that he will not sign the bill that came over from the Senate last evening because of his legitimate concerns for border security,” Ryan, R-Wis., told reporters outside the White House after meeting with Trump.

“So what we are going to do is go back to the House, work with our members," Ryan said. "We want to keep the government open, but we also want to see an agreement that protects the border.”

Ryan said they also have “very serious concerns” about securing the U.S.-Mexico border.

House Majority leader Kevin McCarthy, R-Calif., said Trump thinks the bill as passed by the Senate is just “kicking the can down the road."

“We believe there is still time," McCarthy said. "We can have border security.”

In a statement following Trump's meeting, White House press secretary Sarah Sanders reiterated that funding for the border wall was "urgently" needed.

“We protect nations all over the world, but Democrats are unwilling to protect our nation," Sanders said in a statement. "We urgently need funding for border security and that includes a wall.”

The Senate passed a short-term continuing resolution Wednesday night to avert a partial government shutdown. But the bill, which provides funding for several government agencies until Feb. 8, does not meet Trump’s demand for $5 billion for his border wall.

Conservative lawmakers had been urging GOP leaders to reject the Senate-passed bill if it did not provide the funding for the wall.

Ryan attended the meeting at the White House with McCarthy, Majority Whip Steve Scalise, R-La., House Freedom Caucus Chairman Mark Meadows, R-N.C., and Rep. Jim Jordan, R-Ohio.

Trump summoned GOP leaders to the White House after complaining on Twitter about the lack of funding for his long-promised border wall.

In a statement released earlier Thursday, Sanders said Trump was "continuing to weigh his options," but did not want to proceed with legislation "without border security," which includes money for the wall.

The president has pressed Congress to allocate money for the wall on the U.S.-Mexico border, and last week, he told Senate Minority Leader Chuck Schumer, D-N.Y., and House Minority Leader Nancy Pelosi, D-Calif., that he would be "proud" to shut down the government over the border wall.

Pelosi has been adamant that her party would not back legislation that includes money for the wall, telling reporters that Republicans were having a "meltdown" over wall funding.

Schumer, speaking on the Senate floor, called the effort by House conservatives to add $5 billion to the spending bill "futile," as such a measure would not pass the Senate.