Researchers and science advocates in the US are celebrating the new $1.3 trillion (£920 billion) spending bill that will fund the government for the remainder of this fiscal year. President Trump signed the measure into law on 23 March despite having threatened to veto it, and its enactment avoided a government shutdown slated to go into effect at midnight.

The spending bill came almost halfway through the fiscal year, and brings total US federal R&D spending to $177 billion – its highest ever in inflation-adjusted dollars, according to the American Association for the Advancement of Science. The figure represents an increase of nearly 13%.

The National Institutes of Health’s (NIH) budget increases almost 9% to $37 billion, and the National Science Foundation (NSF) sees its funding jump about 4% to $7.8 billion. In addition, Nasa’s budget rises 6% to $21 billion, and the Department of Energy’s (DOE) Office of Science receives a 16% increase to $6.3 billion.

The final budget rejects Trump’s proposed cuts of more than 30% to the Environmental Protection Agency (EPA), keeping the agency’s funding at 2017 levels. Spending on its science and technology programme remained flat at $706 million.

In contrast, the budget that the Trump White House proposed for 2018 back in May 2017 would have slashed total government spending on research by nearly 17%, shrunk NIH funding 22%, reduced the NSF’s budget by 11% and decreased funding for the DOE Office of Science by 17%. The EPA’s science and technology programmes would also have endured a 44% reduction.

The rosier outcome for science was made possible by the bipartisan budget deal that Congress passed last month, which significantly raised the caps for non-defence spending, including science agencies, in 2018 and 2019.

‘The challenge is that the agencies will have to spend money double time for the rest of this fiscal year to get the money out the door – it’s a good problem to have,’ says Ben Corb, who directs public affairs at the American Society for Biochemistry and Molecular Biology. ‘We love this increase and would have preferred if we had had it at the beginning of the fiscal year, but now that we have it we are looking forward to the agencies opening up their wallets.’

Glenn Ruskin, spokesperson for the American Chemical Society, tells Chemistry World that his organisation is grateful for the windfall for key science agencies because it ‘puts them on a predictable and sustainable course that has been sorely lacking’.