WASHINGTON — A splintered Senate swatted down competing Democratic and Republican plans for ending the 34-day partial government shutdown on Thursday, leaving President 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 two more votes than the GOP plan. There were six Republican defectors, including freshman Sen. Mitt Romney, R-Utah.

Meanwhile, House Speaker Nancy Pelosi on Thursday rejected Trump’s suggestion of “some big down payment” for the border wall as part of a solution to end the shutdown.

Asked whether she knows the size of a down payment that Trump might find reasonable, Pelosi replied, “I don’t know if he knows what he’s talking about.”

There were signs, however, lawmakers on both sides were seeking ways to resolve their vitriolic stalemate, if only temporarily.

Senate Minority Leader Chuck Schumer, D-N.Y., spent a half-hour in the office of Senate Majority Leader Mitch McConnell, R-Ky., and a parade of senators from both parties took to the Senate floor to advocate reopening agencies for three weeks while bargainers seek a solution.

“We’re talking,” Schumer told reporters, one of the most encouraging statements either side has made since the shutdown began Dec. 22.

For most of Thursday, both parties in conflicting ways showed their 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 50-47 vote for the measure fell 10 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.

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.”