The $1.3 trillion omnibus spending bill that President Donald Trump signed into law today preserves several of the scientific initiatives his administration wanted to kill, including a West Coast earthquake warning system and the WFIRST space telescope.

It may not be popular with Senate GOP conservatives such as Rand Paul, but the bill’s a hit with the likes of the American Association for the Advancement of Science.

“The scientific community is over the moon with the bipartisan omnibus bill in Congress that significantly increases funding for research and development,” AAAS CEO Rush Holt, a physicist who served in the House from 1999 to 2015, said in a statement.

AAAS’ analysis shows that total R&D spending would reach its highest point ever in inflation-adjusted dollars, amounting to $176.8 billion. Among the highlights:

Earthquake research: The White House wanted to zero out federal funding for the ShakeAlert program, which aims to provide precious seconds of advance notice that a seismic shock is coming. The omnibus spending bill provides $12.9 million for continued development during the current fiscal year, which is a $2.7 million increase over the 2017 level of support. There’s also a one-time $10 million award to add more sensors to the West Coast seismic monitoring network.

Energy research: The White House wanted to kill ARPA-E, a DARPA-like energy innovation agency at the Energy Department that’s one of Bill Gates’ favorites. There was also a cloud over U.S. support for the international fusion research program known as ITER. The omnibus spending bill saves both programs. U.S. contributions to ITER will rise to $122 million, more than double the previous level. ITER’s construction effort is ramping up, with completion targeted for the mid-2020s.

NASA: The space agency will see its budget boosted by $1.1 billion to $20.7 billion. Earth science missions such as OCO-3, CLARREO-Pathfinder and DSCOVR will live on. So will NASA’s education program. Work can continue on WFIRST — the Wide Field Infrared Survey Telescope, which astronomers rated as one of their top priorities for the next decade. Planetary science programs will get a 20 percent boost. The bill sets aside $595 million to send a probe and a lander to Europa, a Jovian moon that may harbor an ice-covered ocean and perhaps life.

Environment: The spending bill rejects the White House’s proposed $2.5 billion cut in the Environmental Protection Agency’s budget, and preserves the EPA’s core research missions at current levels.

Health research: Each institute within the National Institutes of Health will receive a roughly 5 percent increase over 2017 spending levels at a minimum. The bill also directs an additional $414 million for Alzheimer’s research, and an additional $500 million for opioids research. The Cancer Moonshot, BRAIN Initiative and Precision Medicine Initiative will receive the funding mandated by the 21st Century Cures Act, which was championed by Vice President Joe Biden at the end of the Obama administration.

The House approved the budget Thursday, and the Senate followed suit hours later. Trump had hinted that he might veto the bill, but he ended up signing it to avert a government shutdown that would have been triggered at midnight tonight.

The omnibus bill authorizes spending through the end of the current fiscal year on Sept. 30, but a fresh set of budget bills will have to be drawn up for the 2019 fiscal year. Which means yet another gauntlet looms for endangered science programs. But isn’t that always the way it is?

This is an updated version of a report that was originally published at 7:06 p.m. PT March 22.

Get deep technical and business insights on the cloud from leaders at Microsoft, Amazon, Google, Apple and more. GeekWire’s Cloud Tech Summit is the premier independent technical conference for anyone looking to get ahead in the cloud, from developers to business decision makers. Including deep-dive technical sessions on AI/ML, Serverless, DevOps, Containers, SaaS, Hybrid Cloud and more.Learn more and register here.