WASHINGTON – President Donald Trump said Thursday he is open to a measure to end the partial government shutdown for three weeks in exchange for a "down payment" on his border wall, marking a potential breakthrough in the weekslong stalemate.

Trump's comments that he would consider a "reasonable agreement" worked out by Senate leaders to reopen federal agencies came as pressure built on him and congressional Democrats to end the impasse that dragged the shutdown into a 34th day, the longest such lapse in U.S. history.

Senate Majority Leader Mitch McConnell, R-Ky., and Senate Minority Leader Charles Schumer, D-N.Y., began a flurry of talks earlier Thursday over a short-term funding measure after two competing bills to reopen the government failed on the Senate floor.

Trump said that if McConnell and Schumer "come to a reasonable agreement, I would support it, yes."

Discussions Thursday didn't appear to break new ground as Schumer's office said no funding for a border wall would be considered, whether it was prorated or just a down payment.

"Sen. Schumer and Senate Democrats have made clear to Leader McConnell and Republicans that they will not support funding for the wall, prorated or otherwise," said Justin Goodman, a spokesman for Schumer's office.

It was not clear how large Trump's "down payment" would need to be to secure his support. The president left himself room to back away from any deal reached by leaders on Capitol Hill.

“It depends on what the agreement is,” Trump said.

If such an agreement lacked any funding for a wall, Trump said, "I wouldn’t be happy with it."

“I have other alternatives if I have to," said Trump, who has suggested he could declare a national emergency as a way to find additional money for the wall. "We have to have a wall in this situation.”

Trump first raised the prospect of using an emergency declaration to shift money away from military construction projects toward his wall in early January. Weeks later, he backed away from the idea, saying he didn't want to move quickly as lawmakers negotiated a legislative solution.

Thursday, internal documents reviewed by CNN suggested the White House was preparing a draft emergency proclamation as recently as last week that could free up more than $7 billion. White House aides did not immediately respond to questions about the report.

Trump's remarks Thursday were a departure from his demand for $5.7 billion in border wall funding as a prerequisite for opening the government. Democrats considered offering more money for border security but said the offer would include no new money for a wall.

Trump offered an extended and familiar riff on illegal border crossings, saying that technology is not enough to defeat the problem.

“You need the wall,” Trump said.

House Speaker Nancy Pelosi, D-Calif., threw cold water on the notion of a down payment.

"I don’t know if he knows what he's talking about, do you?" she asked.

Talks escalated amid increased public pressure on Trump as well as on some of his Democratic opponents. Workers in essential government services such as air-traffic control, the FBI, the IRS, the Coast Guard and airport security have said performance is suffering because of the shutdown.

Members of both parties said they have heard rising complaints from constituencies. A group of House Democrats asked Pelosi to seek an accommodation with Trump on wall funding.

Sen. Lindsey Graham, R-S.C., said a three-week reopening of federal agencies would indicate "good faith from both sides."

White House spokeswoman Sarah Sanders said earlier that congressional leaders were negotiating "to see whether or not they can work out of the deadlock."

To win White House support, she said, any agreement would require "a large down payment on the wall.”

More:Shutdown: Senate rejects dueling bills to end deadlock; Trump ally Graham urges short-term measure

More:The government shutdown is in its fifth week. How many days is that?

More:Shutdown, Day 34: Senate rejects dueling bills to end government impasse

Contributing: Eliza Collins