Updated on March 23 at 2:31 p.m. ET

When President Donald Trump was sworn into office, much of the science community braced for the worst. Trump had long shown a stubborn disregard for any scientific knowledge that differed from his beliefs. Many scientists wondered what havoc the new president, empowered by a Congress controlled by Republicans, might wreak on the policies that affected their work.

Trump first announced his funding priorities for 2018 in March of last year, and it was just as many researchers had feared. His administration’s proposal called for significant boosts in military and border-security spending and historically large cuts for science and health agencies, particularly the Environmental Protection Agency and the National Institutes of Health, and climate-research programs across the government.

Congress ignored those priorities as it negotiated funding for fiscal year 2017, declining to get a head start on the president’s cuts. The federal spending bill passed and signed into law by Trump last May didn’t include significant cuts to science, technology, and health agencies, and even provided some substantial increases to some.

Now, the same thing has happened again.

This week, Congress passed a $1.3 trillion spending bill for fiscal year 2018—months after it actually started, but that’s another story—that ignores many of the cuts the White House recommended last year. Instead, nearly every science agency will receive more funding than before. In addition, total federal spending on research and development will “reach its highest point ever in inflation-adjusted dollars,” according to a report by Matt Hourihan, the director of the American Association for the Advancement of Science’s R&D Budget and Policy Program.

By early Friday morning, both chambers of Congress had signed off on the bill, hoping to avoid the looming government shutdown. The White House initially said Trump would sign it, but Trump tweeted several hours later that he was “considering a veto” of the bill over what he said was lack of funding for immigration and border-security policies. By Friday afternoon, Trump did indeed sign the spending bill into law.

For the science community, the new law isn’t just a good budget. It’s a great budget. Many advocates for science and research had been holding their breath since Trump made his budget request, waiting to see whether Congress would support his administration’s vision. They marched in Washington and prepared to run for office. As the 2018 spending started circulating this week, they seemed to exhale, taking to social media to thank lawmakers.

Congress ignored Trump’s proposals for cuts in a number of other policy areas, too, because they’ve decided to spend more on pretty much everything, as my colleague Russell Berman has reported. In February, in a rare bipartisan move, congressional leaders approved a two-year budget agreement that calls for an increase of about $300 billion in overall spending. “Congress increased the size of the budgetary pie and nearly everyone got to grab a bigger slice,” says Casey Dreier, a the director of space policy at the Planetary Society, a nonprofit advocacy group.

Under this budget, the National Institutes of Health will receive $37 billion, about $3 billion more—a 8.7 percent increase—from the previous fiscal year. The Trump administration, meanwhile, had proposed cutting the NIH’s budget by 22 percent. Every individual institute inside NIH will receive about a 5 percent increase at minimum, according to Hourihan’s analysis.

The National Science Foundation will receive $7.8 billion, $295 million more than the previous year, which represents a 3.9 percent increase, and includes funding for the construction of three new oceanographic research vessels. Trump’s 2018 request didn’t specify cuts to the NSF, but his request for fiscal year 2019, released last month, called for the foundation’s budget to be cut by 30 percent. His administration later reversed course and said it would leave the NSF’s 2019 budget untouched.

The law keeps the budget of the Environmental Protection Agency, a favorite target of the Trump administration, flat. The White House sought to gut the EPA’s budget by 31 percent. The Department of Energy’s Office of Science will get $6.26 billion, $868 million more, representing a 16 percent increase. The Trump administration had asked for a 17 percent decrease.

The National Oceanic and Atmospheric Administration will receive $5.9 billion, an increase of $234 million, or 4 percent. The U.S. Geological Survey will get $1.1 billion, an increase of $63 million, or 6 percent, and the number of its climate-science centers will be spared from reductions.

NASA will receive $20.7 billion, $1.1 billion more than the previous year. The space agency’s science programs will increase by about 8 percent to $6.2 billion and its planetary-science program, in particular, by 21 percent, to $2.2 billion. “At NASA, Congress soundly rejected every major cut proposed by the White House,” Dreier says. “Planetary science [will] see its best budget perhaps ever.” Congress maintained funding for NASA’s next space telescope, the Wide Field Infrared Survey Telescope, which the Trump administration recommended canceling altogether in its 2019 request. The budgets for NASA’s earth-science programs remain untouched.

These increases would have come whether Trump was in office or not, Hourihan says, thanks to Congress’s decision to spend more across the board. “There’s actually a pretty long history of Congress funding science when they give themselves the financial room to do so, regardless of whoever’s in the White House and whatever they propose,” Hourihan says.

But Congress’s decision to fund science programs above what Trump wanted is meaningful in another way. Republicans could have fought to include the president’s priorities for science funding in last year’s spending bill, for fiscal year 2017, or this year’s, for the remainder of fiscal year 2018. They had months to negotiate and deliberate and reflect the White House’s ambitions in their own legislation. Ultimately, they decided to ignore Trump. Republican lawmakers, it appears, are willing to formally disregard the president’s desires when it comes to science funding. Congress holds the purse strings in Washington, not the White House, and Republican lawmakers have shown they won’t necessarily fight for the Trump administration’s priorities on this, as many in the community had feared. What may have looked like a plot twist last year—a Republican-controlled Congress making scientists happy—stands now to become a pattern instead.

“It’s easy for observers outside of Washington to see what the rhetoric is coming from the White House, or see what’s in the proposals from the White House, and believe that those big funding cuts are more likely than they actually are,” Hourihan says.