Fabrizio Bensch / Reuters

President Obama finally got a Republican-controlled Congress to fund his domestic budget. All it took was Donald Trump in the White House to get it done.

In the $1.3 trillion spending bill that President Trump reluctantly signed on Friday, lawmakers did more than reject the steep cuts in dollars and programs that Trump proposed for domestic agencies a year ago. Across much of the government, Republican leaders agreed to spending levels that matched or even exceeded what Obama asked Congress to appropriate in his final budget request in 2016—and many of which lawmakers ignored while he was in office.

The Department of Health and Human Services received $78 billion, nearly identical to the $77.9 billion Obama sought and almost 20 percent more than what the Trump budget called for. Ditto for the Department of Labor and the Department of Education, which got $1.5 billion more than Obama’s final request and nearly $12 billion more than the reduced level Trump sought. Obama-era priorities like Head Start and Pell Grants drew increases, too.

Congress eliminated none of the 18 independent agencies Trump wanted to scrap, including the Corporation for Public Broadcasting, the National Endowment for the Arts, and the National Endowment for the Humanities. And several of the programs he wanted to zero out won huge increases instead. Take the TIGER grants, an infrastructure program created by Obama’s 2009 economic stimulus package. Congress had allocated $500 million to it each of the last several years, despite annual Obama requests to boost it to $1.25 billion. Trump’s budget called for axing it entirely, but lawmakers went even higher than Obama, giving $1.5 billion to TIGER. Or the Community Development Block Grant, a federal housing program that had been receiving $3 billion from Congress annually. Obama actually proposed cutting its funding by $200 million in 2016, while Trump called for chopping it altogether. In the end, it received $3.3 billion—a 10 percent boost.

The spending spikes all contributed to this week’s unexpected display of Democrats celebrating legislation enacted under complete GOP control of Washington. And the victories for a president who has been out of office for a year were not lost on conservatives. “This could have been written by President Obama and liberal Democrats,” Senator Rand Paul of Kentucky said Thursday night on Fox News, hours before he consented to a vote on a 2,200-page bill most of his colleagues hadn’t had time to read. Senator Ben Sasse of Nebraska accused his party of hypocrisy. “Every Republican would vote against this disgusting pork bill if a Democrat were president,” he said in a statement.

The domestic spending increases were set in motion a month ago, when Trump signed a budget agreement Congress approved so that he could get the dramatic spike in military spending he had prioritized all along. Lawmakers on the House and Senate appropriations committees—in negotiations with party leaders and the White House—decided exactly how the money would be spent. But the details of the domestic spending sparked a new round of complaints among conservatives who lamented the return of a big-spending Republican governance they once campaigned against.

And Trump took notice. First, as my colleague Elaina Plott reported, he vented to colleagues about insufficient funding for his southern border wall and the lack of restrictions for so-called sanctuary cities. Then, he bemoaned that he was forced to “waste money on Dem giveaways” in order to secure a 10 percent jump in defense spending and some additional funding for border security. Trump tweeted Friday morning that he was considering a veto even after the bill cleared Congress, but his advisers talked him down. By early afternoon, he had signed the omnibus, but not before delivering a rambling speech in which he vowed never to approve such a bill again, called for a line-item veto that the Supreme Court struck down as unconstitutional in 1996, and reiterated his demand for eliminating the Senate’s legislative filibuster—a step that Majority Leader Mitch McConnell has repeatedly rejected.

Trump’s evident despair over the legislation helped salve frustration among Democrats who were unable to secure protections for young undocumented immigrants in the Deferred Action for Childhood Arrivals program. Instead, party leaders were gleeful at what they had won. “This spending agreement brings the era of austerity to an unceremonious end and represents one of the most significant investments in the middle class in recent history,” Senate Minority Leader Chuck Schumer proclaimed in a press conference.

In addition to winning increases in domestic spending, Democrats were able to preclude the inclusion of dozens of the same restrictive policy riders that Republicans had tried to add while Obama was president. The legislation retained funding for Planned Parenthood, for example, despite years of Republican promises to prohibit it. “We don’t have the House. We don’t have the Senate. We don’t have the presidency,” Schumer said, “but we produced a darn good bill for the priorities that we have believed in.”

Representative Tom Cole of Oklahoma is the Republican chairman of the House appropriations subcommittee responsible for the Departments of Education, Labor, and Health and Human Services—by far the largest subsection of the domestic budget. When I interviewed him on Friday, he initially conceded that critics had “a fair point” in saying that the spending bill largely fulfilled Obama’s domestic wishes. Cole put the onus on Trump and the Republican leadership, which agreed to the trade of significantly higher domestic spending for the increase in defense money. By virtue of the 60-vote threshold in the Senate, Democrats had leverage, and they used it, he said. “We ended up spending a lot more money than we wanted to because the Senate rules put the Democrats in the game,” Cole said. “They’re not going to give their votes away for free.”

But Cole went on to argue that the spending allotments domestically did not so much reflect Democratic priorities as they were “congressional priorities” that lawmakers in both parties backed. Republicans used the higher budget caps to steer money toward programs that they had historically supported, like medical research at the National Institutes of Health, Native American programs, or the college preparatory initiatives Gear Up and TRIO. “There's a lot more money for NIH than Barack Obama proposed in any budget,” Cole said. “There's a lot more money for Native American programs than he ever proposed.”

He continued: “To say this is the Barack Obama domestic budget is just not true. To say that we're spending more domestically than we wanted to do is true. But we did that in order to get the defense spending.”

As Cole noted, no presidential budget “survives contact with Congress.” Power of the purse is one of the few remaining powers that legislators on Capitol Hill guard jealously, and even Obama did not secure all of his priorities when Democrats controlled the House and Senate early in his term. But the degree to which a Republican-controlled Congress rejected out of hand most of the proposals for a Republican president is stark, and it can be explained by a couple of factors.

For one, just about everyone in Washington understood Trump’s budget—both in his first year and the one he presented in February—to be a reflection not so much of the president’s wishes as it was those of Mick Mulvaney, his conservative budget director. Mulvaney, a former South Carolina congressman, has little pull on Capitol Hill beyond the hardline House Freedom Caucus that he helped to found. By the time he released his second budget earlier this year, Mulvaney acknowledged himself that it was little more than “a messaging document.”

Beyond a few big-ticket items like the border wall and added defense spending, Trump made little personal effort to insist on the cuts his budget proposed, and nor, for the most part, did his lieutenants. “I don't think they were as deeply involved at the subcommittee and committee levels as Obama or Bush,” Cole said. “This administration will probably get there, but it may take a while.”

Republicans on and off Capitol Hill also said the Trump administration was hobbled throughout the budget process by a dearth of appointees in key positions to advocate for its priorities on the granular, programmatic level. “They’re just basically not staffed up to do this work,” said Bill Hoagland, a senior vice president at the Bipartisan Policy Center who for two decades served as a top GOP staffer on the Senate Budget Committee.

Hoagland said the Trump administration was “somewhat irrelevant” in the budget process. It’s a reality that may explain why a Republican president unhappily signed a spending bill that fulfilled his Democratic predecessor’s wishes as much or more than his own.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.