Around noon on Friday, House Speaker Nancy Pelosi was expecting some sort of action to end the shutdown to come within the hour. She wasn’t sure exactly what.

“I guess he’s going to be saying something about how he’s gonna build a wall,” she told a roundtable of journalists in the conference room of her suite of offices. “Hopefully he will understand that we can’t go down that path of any discussion of that until government is open.”

Over the course of the next hour, Pelosi took reporters’ questions, with occasional interruptions when a staffer would slip her notes. Around 12:35, when she received one such note, she told the staffer that the caller would need to wait a couple of minutes, or perhaps someone else on staff could call back.

“It’s Chuck,” she told the room, referring to the Senate Democratic leader. “It could be big, I don’t know.”

It was: Trump had caved. On the ropes as he faced atrocious polling numbers, Senate Republicans on the verge of mutiny, halts to flights at major East Coast airports on Friday, and no-shows at work from thousands of IRS employees, President Donald Trump went along with a Senate plan to reopen the government for three weeks without any border wall funding, an idea he’d rejected several times since the shutdown began. A conference committee between House and Senate negotiators will try to reach a border security deal over the next three weeks—and if it doesn’t include additional physical barrier funds, Trump might declare a national emergency.

In other words, after shutting down part of the government for 35 days, Trump secured zero dollars for his proposed border wall. Pelosi and Schumer, who refused to negotiate on the wall, had won the standoff. The only spin that Trump could come up with, in announcing the deal at the White House, was that he had successfully impressed the importance of physical barriers upon congressional Democrats, “dozens” of whom had reached out to him saying they were ready to deal on the wall. That may or may not be true. But he had to say something to save whatever face he could.

“He’s going to claim victory whatever” the outcome is, Pelosi had said at the roundtable. She pointed to a centerpiece of flowers on the conference table. “We could plant these flowers along the border, and [he’d say], ‘I got my wall.’ ”

It was Pelosi on Friday who actually got to claim credit for the victory. In another world, a Democratic leader might have grown antsy after a couple of weeks (or days) of the shutdown, delivered the president a chunk of his signature policy, and then watched, upon the next funding deadline, as the president chose to shut down the government again to get the next chunk. Instead, Pelosi trusted public opinion surveys that showed the president earning most of the blame for the shutdown, and waited for Republicans to break under the stress of an unsustainable position. It was a strategy born from experience, an experience that some House Democrats, in the days after the election, thought they didn’t really need or wasn’t worth the baggage.

Pelosi spent much of the shutdown waiting patiently for the president’s cave, but occasionally took to the offense. On Friday she explained how she thought through her plan to block Trump from delivering the State of the Union during a shutdown: “You always start with a feather, until you get to the sledgehammer.”

She rattled through the process: “We’re still in a shutdown. Let’s agree on a mutually agreeable date. ‘No, I’m coming anyway.’ Please don’t come until government is not shut down. ‘No, I’m coming anyway.’ The House will not be passing a concurrent resolution to prepare for the president’s visit.”

The polite way she introduced the State of the Union postponement, she said, fit in with how she tries to interact with the president: “You have to be respectful of the office that he holds, perhaps even more respectful of the office he holds than he is.”

We don’t know which of Trump’s many stressors finally made him budge. But a couple of days after the State of the Union was officially called off from its originally scheduled date, he budged.

Pelosi said she doesn’t like to psychoanalyze the president or try to guess why he is the way he is. But she’s hardly above jabbing at his insecurities. In December, she described Trump’s fixation on the wall as a “manhood thing for him.” Earlier this month, she said Trump might be under the impression that furloughed workers “can just ask their father for more money.” And when a columnist began a question on Friday by calling Trump a “very complicated” person, she interrupted.

“No,” she said. “I think he’s very simple.”

It’s either that simplicity or an overabundance of complications that leads Donald Trump to think that he may, at the end of this congressional debate over border security in three weeks, finally get his wall money. Expect the same voices who called on Pelosi to give the president some wall money in exchange for reopening the government to call on her again to cut a deal.

During a press conference after the reopening of the government was announced, Pelosi was asked whether she was more flexible on wall funding now that the hostage had been released.

“Have I not been clear on the wall?” she said. “No, I’ve been very clear on the wall.”

Maybe Trump will pay attention this time.