WASHINGTON (Reuters) - President Donald Trump, who famously vowed to negotiate big deals in the White House, came out of a government shutdown battle on Friday politically wounded and outmaneuvered by U.S. House of Representatives Speaker Nancy Pelosi.

With Americans exasperated over the 35-day shutdown’s impact on everyday life, including air travel, Trump finally gave in and agreed to reopen the government until Feb. 15, without getting the $5.7 billion he had demanded for a border wall.

In a speech in the Rose Garden, he did not admit to backing down. But behind the scenes at the White House, there was a recognition that he had lost this round. “Perhaps he lost the short-term battle,” one senior administration official said.

True to form for this administration, the outcome was uncertain until the last minute. On Thursday night, Vice President Mike Pence and senior adviser Jared Kushner, the president’s son-in-law, presented Trump with four options, including declaring a national emergency right away, which would let him fund the building of border a wall without congressional approval but guaranteeing a court challenge.

Trump slept on it. On Friday morning, an air of uncertainty hung over the White House as Trump pondered. Aides prepared the Rose Garden event without knowing for sure what he would say.

He opted to let lawmakers fully reopen the government for three weeks and try again to craft a mutually agreeable border security package, the senior administration official said.

A key factor for Trump, the official said, were stories of law enforcement officials unable to adequately do their jobs because of the shutdown that had left 800,000 federal workers at home on furlough or working for no pay.

U.S. President Donald Trump announces a deal to end the partial government shutdown as he speaks in the Rose Garden of the White House in Washington, U.S., January 25, 2019. REUTERS/Kevin Lamarque

“We don’t think we caved,” said another senior White House official. “We have been consistent that we want to go through the process. The president wants to give this one more shot.”

Several officials said the struggle was not entirely over. They said Trump has grown increasingly confident that more Democratic lawmakers will support border security funding in weeks ahead, despite Pelosi’s flatly telling him that under no circumstances would she allow wall money to emerge from the House of Representatives that her fellow Democrats control after sweeping to a majority in the November mid-term elections.

The shutdown battle left scars on Trump. His administration looked out of touch with ordinary Americans when Commerce Secretary Wilbur Ross wondered aloud in a CNBC interview why federal workers who missed two paychecks didn’t just get loans.

Trump’s job approval ratings drooped from an already anemic 40 percent down into the mid-30s, a troubling sign as he looks ahead to a 2020 re-election battle, already clouded by the prospect of more headlines from a Russian election meddling probe. That was driven home on Friday by the arrest of long-time Trump friend Roger Stone in an FBI dawn raid in Florida.

Gaining the advantage, at least for now, was Pelosi. As House speaker, she is now Trump’s main foil in Washington.

Trump earlier had been among the first to say Pelosi earned her position. “I think she deserves it,” he said then.

The two leaders tangled repeatedly through the shutdown fight. Pelosi rescinded her invitation to Trump to deliver his State of the Union speech in the House chamber on Jan. 29, citing security concerns due to the shutdown. Trump then refused to let Pelosi use a military plane for an overseas trip.

The senior administration official said Pelosi, in taking on the president so directly, might have hurt some of her fellow Democrats in districts won by Trump in 2016. Some of them had wanted her to negotiate earlier, the official said.

“Maybe she’s appealing to the left wing of her party, but she’s risking her majority in doing that,” the official said.

Still, a Trump adviser said the president’s view of Pelosi has not changed. “She’s tough, she’s stubborn,” the adviser quoted the president as saying privately about the speaker.

Matt Schlapp, chairman of the American Conservative Union and a close Trump ally, said this of Trump’s view of Pelosi: “He has respect for her. He knows that she’s a tough operator. He does not dislike her.”