Senators on Thursday embarked on fresh behind-the-scenes negotiations to end the longest-
ever government shutdown, and House Democrats struggled to finalize a new border security plan, after the failure of two competing Senate bills forced renewed efforts to find some other way out.

It was unclear, though, whether any of the activity would yield a solution, as the fundamental dynamics that produced the shutdown remained unchanged: President Trump’s demand for new funding for his U.S.-Mexico border wall, and Democrats’ refusal to give it to him.

A plan newly floated by a bipartisan group of senators to reopen the government for three weeks while negotiating over border security seemed to collapse almost as soon as it emerged, with the White House insisting Trump would accept such a proposal only if it included a “down payment” on his wall — and House Speaker Nancy Pelosi (D-Calif.) calling that a non-starter.

And the plan House Democrats are working to roll out, while expected to match or exceed the $5.7 billion Trump has put forward for his wall, will specifically exclude funding for it, instead directing the money toward technological improvements and other changes along the border — probably making it unacceptable to the president.

Speaking at the White House after the Senate blocked his proposed border solution and a competing Democratic plan, the president said that if Majority Leader Mitch McConnell (R-Ky.) and Minority Leader Charles E. Schumer (D-N.Y.) could come up with a “reasonable agreement,” he would support it.

Asked if he could support a plan that didn’t include wall funding, Trump said: “I have other alternatives if I have to . . . we have to have a wall in this situation.” Trump has suggested declaring a national emergency to circumvent Congress and use the military to build the wall, a possibility that remains on the table if the impasse continues.

The shutdown hits day 35 on Friday, and 800,000 federal employees face the harsh reality of a second missed paycheck. The urgency about reaching a solution was plain among lawmakers of both parties, as horror stories from the shutdown multiplied. These included fresh warnings about dangers to air travel as federal workers in aviation security and safety go unpaid, and a report from NASA’s Johnson Space Center that custodial services have been canceled for employees working without pay to keep the International Space Station running, and they’ve been asked to volunteer to clean bathrooms themselves.

Exasperated GOP senators complained to Vice President Pence at a closed-door lunch, according to senators, but Pence offered few specifics while seeking to reassure lawmakers that there were other options under consideration.

“There was a lot of frustration expressed about the situation we find ourselves in,” said Sen. John Cornyn (R-Tex.).

During the lunch with Pence, McConnell quoted a favorite saying that he often uses to express his displeasure with government shutdowns: “There is no education in the second kick of a mule,” according to two Republicans familiar with the exchange who spoke on the condition of anonymity to discuss it. McConnell’s comment was first reported by the Hill newspaper.

Sen. Ron Johnson (R-Wis.) confronted McConnell over the day’s proceedings at the same lunch, telling him, “This is your fault,” according to one of those same Republicans and another person who witnessed the exchange, also speaking on the condition of anonymity.

McConnell responded: “Are you suggesting I’m enjoying this?” the people said.

Asked about the exchange, Johnson spokesman Ben Voelkel said Johnson was not blaming McConnell for the shutdown, but rather voicing frustration about the day’s votes, which many senators anticipated were on course for failure.

As he left the Capitol around 7 p.m. Thursday, McConnell struck a somewhat optimistic tone, telling reporters: “Well at least we’re talking, and I think that’s better than it was before.”

Democrats railed over the ongoing impasse and its effect on their constituents.

“This is a joke!” Sen. Michael F. Bennet (D-Colo.) shouted on the Senate floor. “How ludicrous is it that this government is shut down over a promise the president of the United States couldn’t keep, and that America is not interested in having him keep — this idea that he was going to build a medieval wall across the Southern border.”

The first bill the Senate defeated was a proposal from Trump to reopen the government through Sept. 30 while spending $5.7 billion to erect more than 200 miles of new border walls. Trump’s plan also would clamp down on asylum seekers and provide temporary deportation relief to about 1 million unauthorized immigrants whose protections Trump previously had sought to end.

The vote was 50 to 47, short of the 60 votes needed to advance. Conservative Republican Sens. Mike Lee (Utah) and Tom Cotton (Ark.) voted with the majority of Democrats against the plan, saying that it didn’t offer the immigration changes needed, while Sen. Joe Manchin III (D-W.Va.) joined Republicans in supporting it.

The second vote was on a short-term spending bill from Democrats that would have reopened the government through Feb. 8 without any additional wall money, to allow for negotiations on border security with the government open. Both bills contained billions of dollars for hurricane and wildfire disaster relief, although the figure in the Democratic bill was higher, partly because it included aid to Puerto Rico that Trump has opposed.

The vote on the Democrats’ bill was 52 to 44, also short of 60, with Republican Sens. Susan Collins (Maine), Lisa Murkowski (Alaska), Cory Gardner (Colo.), Lamar Alexander (Tenn.), Johnny Isakson (Ga.), and Mitt Romney (Utah) defying Trump to join all Democrats in voting in favor.

The votes unfolded as a couple dozen House Democrats crowded into the Senate chamber to watch, including some of the newly arrived freshmen who flipped the House from GOP control only to arrive in Washington amid a government shutdown they have limited power to solve.

Afterward, a bipartisan group of more than a dozen senators began to take turns speaking on the Senate floor to call for reopening the government for three weeks while finding a compromise on border security — a solution the White House had already rejected.

One of these lawmakers, Sen. Lindsey O. Graham (R-S.C.), described speaking with Trump on the phone just after the votes to tell him senators were coalescing behind the short-term spending deal, and he indicated Trump had shown some openness to him and told him some conditions he would require.

Graham said he had “never been more optimistic than I am now that we can find a way to open up the government.” But then Trump said he would need “some sort of prorated down payment on the wall” to agree to the plan, and Pelosi rejected that idea, saying it would not be a “reasonable agreement.”

“I don’t know if he knows what he’s talking about. Do you?” Pelosi added.

McConnell and Schumer met briefly after the Senate votes, but Schumer refused to answer questions as he returned to his office, saying only: “We’re talking, we’re talking.”

Senators remained uncertain about whether a deal would emerge — and if it did, what it would look like.

“I don’t know what’s going to happen next. Nobody knows,” said Sen. Richard C. Shelby (R-Ala.).

“There are all kind of discussions,” said Sen. John Neely Kennedy (R-La.). “You’ve got, you know, people running around, I don’t mean this in a pejorative sense, but like sprayed roaches. They’re everywhere.”

In the House, Pelosi and Democratic leaders were working to finalize legislative proposals that would represent their proactive description of what they support when it comes to border security. It comes amid growing agitation among lawmakers, particularly some freshmen, that they must stand for something — not just oppose the wall Trump long claimed Mexico would pay for.

House Democrats planned to roll out the proposal at a news conference Friday morning, but it was delayed as leaders waited to see if something would emerge from the Senate.

Details remained in flux, but Rep. Bennie Thompson (D-Miss.), chairman of the Homeland Security Committee, said it would “meet or exceed” Trump’s $5.7 billion figure. The money would be spent on drones, sensors, retrofitted ports of entry, more border agents, and other improvements. The proposals will be part of a larger spending bill for the Homeland Security Department, which has been shuttered in the government shutdown, and would not represent new congressional appropriations.

Some Republicans dismissed the House Democrats’ plan even before it emerged.

“The last thing we need is, in my view, is for politicians to be trying to micromanage border security decisions,” Cornyn said.

The developments came as federal employee unions issued renewed warnings about effects on federal services, including air travel. At the same time, Commerce Secretary Wilbur Ross questioned why federal workers are visiting food banks during the partial government shutdown, saying they should instead seek low-interest loans from banks and credit unions to supplement their lost wages.

“I know they are, and I don’t really quite understand why,” Ross said on CNBC when asked about federal workers going to food banks. Ross is a billionaire and a longtime friend of Trump’s.

His comment drew immediate criticism from Pelosi.

“Is this the ‘Let them eat cake’ kind of attitude?” she said. “Or, ‘Call your father for money’?”

At the White House on Thursday, the president’s senior adviser and son-in-law, Jared Kushner, met with several Latino leaders who lobbied for the president to sweeten his offer to Democrats by including permanent legal status, and possibly a path to citizenship, for young immigrants known as “dreamers.”

Kushner responded that “permanency would receive full consideration,” said Daniel Garza, the executive director of the Libre Initiative, a group funded by Charles and David Koch, prominent GOP fundraisers who support the dreamers.

Over the weekend, Trump had proposed a three-year extension of a deferred action program that has provided work permits to 700,000 dreamers. He has tried to cancel the program, and the temporary extension was part of the legislation that failed Thursday.

Paul Kane, Seung Min Kim, David Nakamura and Damian Paletta contributed to this report.