WASHINGTON — A splintered Senate swatted down competing Democratic and Republican plans for ending the 34-day partial government shutdown on Thursday, leaving President Donald Trump and Congress with no obvious formula for halting the longest-ever closure of federal agencies and the damage it is inflicting around the country.

In an embarrassment to Trump that could weaken his position whenever negotiations get serious, the Democratic proposal got one more vote than the GOP plan. There were six Republican defectors, including freshman Sen. Mitt Romney, R-Utah, who’s clashed periodically with the president.

There were faint signs that lawmakers on both sides were looking for ways to resolve their vitriolic stalemate. But Thursday was mostly a day for both parties, in conflicting ways, to show sympathy for unpaid federal workers while yielding no ground in their fight over Trump’s demand to build a border wall with Mexico.

The Senate first rejected a Republican plan reopening government through September and giving Trump the $5.7 billion he’s demanded for building segments of that wall, a project that he’d long promised Mexico would finance. The 51-47 vote for the measure fell nine shy of the 60 votes needed to succeed.

Minutes later, senators voted 52-44 for a Democratic alternative that sought to open padlocked agencies through Feb. 8 with no wall money. That was eight votes short. It was aimed at giving bargainers time to seek an accord while getting paychecks to 800,000 beleaguered government workers who are a day from going unpaid for a second consecutive pay period.

Flustered lawmakers said the results could be a reality check that would prod the start of talks. Throughout, the two sides have issued mutually exclusive demands that have blocked negotiations from even starting: Trump has refused to reopen government until Congress gives him the wall money, and congressional Democrats have rejected bargaining until he reopens government.

Thursday’s votes could “teach us that the leaders are going to have to get together and figure out how to resolve this,” said Sen. John Thune of South Dakota, the No. 2 Senate GOP leader. He added, “One way or another we’ve got to get out of this. This is no win for anybody.”

For now, partisan potshots flowed freely.

House Speaker Nancy Pelosi, D-Calif., accused Commerce Secretary Wilbur Ross of a “let them eat cake kind of attitude” after he said on television that he didn’t understand why unpaid civil servants were resorting to homeless shelters for food. Even as Pelosi offered to meet the president “anytime,” Trump stood firm, tweeting, “Without a Wall it all doesn’t work…. We will not Cave!” and no meetings were scheduled.

As the Senate debated the two dueling proposals, Senate Majority Leader Mitch McConnell, R-Ky., said the Democratic plan would let that party’s lawmakers “make political points and nothing else” because Trump wouldn’t sign it. He called Pelosi’s stance “unreasonable” and said, “Senate Democrats are not obligated to go down with her ship.”

Senate Minority Leader Chuck Schumer, D-N.Y., criticized the GOP plan for endorsing Trump’s proposal to keep the government closed until he got what he wants.

“A vote for the president’s plan is an endorsement of government by extortion,” Schumer said. “If we let him do it today, he’ll do it tomorrow, and tomorrow, and tomorrow.’

Even so, there were suggestions of movement.

Vice President Mike Pence attended a lunch with GOP senators before the vote and heard from lawmakers eager for the standoff to end, participants said. Sen. Roy Blunt, R-Mo., said their message to Pence was “Find a way forward.”

In consultation with their Senate counterparts, House Democrats were preparing a new border security package they planned to roll out Friday. Despite their pledge to not negotiate until agencies reopened, their forthcoming proposal was widely seen as a counteroffer to Trump. Pelosi expressed “some optimism that things could break loose pretty soon.”

The Democratic package was expected to include $5.7 billion, the same amount Trump wants for his wall, but use it instead for fencing, technology, personnel and other measures. In a proposal that the rejected Senate GOP plan mirrored, Trump on Saturday proposed to reopen government if he got his wall money. He also proposed to revamp immigration laws, including new restrictions on Central American minors seeking asylum in the U.S. and temporary protections for immigrants who entered the country illegally as children.

In another sign of hope, Thursday’s vote on the Democratic plan represented movement by McConnell. For weeks, he’d refused to allow a Senate vote on anything Trump wouldn’t sign and has let Trump and Democrats try reaching an accord. McConnell has a history of helping resolve past partisan standoffs, and his agreement to allow Thursday’s vote was seen by some as a sign he would become more forcefully engaged.

In addition, House Budget Committee Chairman John Yarmuth, D-Ky., said that at a closed-door meeting among House Democrats Wednesday night, Pelosi expressed “some optimism that things could break loose pretty soon” but provided no specifics.

With the impacts of the shutdown becoming increasingly painful, however, lawmakers on both sides were trumpeting their willingness to compromise in the battle over border security and immigration issues, such as protection against deportation for immigrants brought to the country illegally as children.

“We can work this out,” said House Appropriations Committee Chairwoman Nita Lowey, D-N.Y.

At a panel discussion held by House Democrats on the effects of the shutdown, union leaders and former Homeland Security officials said they worried about the long-term effects. “I fear we are rolling the dice,” said Tim Manning, a former Federal Emergency Management Agency official. “We will be lucky to get everybody back on the job without a crisis to respond to.” ___

AP Congressional Correspondent Lisa Mascaro and writers Laurie Kellman and Matthew Daly contributed to this report.

Your support is crucial…

With an uncertain future and a new administration casting doubt on press freedoms, the danger is clear: The truth is at risk.

Now is the time to give. Your tax-deductible support allows us to dig deeper, delivering fearless investigative reporting and analysis that exposes what’s really happening — without compromise.

Stand with our courageous journalists. Donate today to protect a free press, uphold democracy and unearth untold stories.

SUPPORT TRUTHDIG