UPDATE: Both the House and the Senate passed the budget bill early Friday morning, following a brief government shutdown at midnight. President Trump has signed the bill into law. 

The Senate, which was expected to pass a budget bill Thursday afternoon that would increase government spending by nearly $300 billion, instead spent the evening quibbling over last-minute details. The disagreements ultimately caused a brief government shutdown around midnight over Sen. Rand Paul's concerns about spending.

But the shutdown didn't last long. The Senate passed the two-year budget deal early Friday morning. The House followed suit shortly after. President Trump tweeted early on Friday that he had signed the bill, which will reopen the government. 

The bill contains $2 billion for electric reconstruction in Puerto Rico -- part of $89 billion in disaster funding for areas impacted by hurricanes and wildfires -- and includes stray energy credits that didn’t make it into the last two tax bills passed by Congress.

The bill includes credits for fuel cells, energy efficiency, microturbines, combined heat and power, carbon capture, and nuclear power. The latter would extend nuclear benefits past 2020, allowing the country’s last large-scale nuclear project under construction, an expansion at the Vogtle Electric Generating Plant in Georgia, to benefit.

Clean energy advocates cheered the inclusion of the credits, even as lawmakers stared down the impending deadline.  

“This legislation provides the market certainty that will support investment in technologies like fuel cells, combined heat and power, energy efficiency, geothermal and advanced nuclear,” said Malcolm Woolf, Advanced Energy Economy’s senior vice president for policy. 

Nuclear Energy Institute President and CEO Maria Korsnick called the passage "a vote for continued American leadership in nuclear energy" that will help both the Vogtle project and a small modular reactor project in Utah from NuScale Power. 

“Both projects will serve as anchors for energy infrastructure in the Southeast and Mountain West, as they generate carbon-free electricity, spur economic growth and support a diverse and reliable electric grid for decades to come," Korsnick said in a statement.

The Distributed Wind Energy Association (DWEA) said the bill allows the industry to "finally refocus" on lowering costs, improving technology, and expanding adoption rather than lobbying for a tax credit extension. 

"We are preparing to launch a breakthrough small wind turbine that cuts energy production costs in half," said Mike Bergey, CEO of Bergey Windpower and a past president of DWEA, in a statement. "A fix to the federal tax credit issue is very timely for us." 

Some in the industry remain disappointed that the bill does not allow energy storage to benefit from the Investment Tax Credit. According to an industry source with knowledge of the conversations around storage, lawmakers were interested in extending expired credits, but not in granting credits for new technologies. 

“That precluded energy storage from this discussion, despite dozens of members of Congress continuing to call energy storage the key to the future of energy and Secretary Perry calling it the 'holy grail,’” the source said.

Legislators also extended energy efficiency credits for homes and commercial buildings through 2017, but the bill left out forward-looking credits for efficiency measures, which troubles efficiency advocates. 

"To incentivize behavior what we really need is predictable, long-term policy that rewards homeowners and builders for efficiency improvements and high-efficiency construction," said Ben Evans, vice president of government affairs and communications at the Alliance to Save Energy, in a statement. "These incentives have significant ripple effects throughout the economy. [...] It’s just smart policy, and we need to continue them or we’re missing a huge opportunity.”

The group said it would continue working with lawmakers to incorporate efficiency measures into later legislation.

The passed bill lays out domestic and defense funding over a period of two years, but funds the federal government until just March 23. That once again gives lawmakers a short block of time to sort out a long-term agreement amenable to both Republicans and Democrats.

The inclusion of credits comes just days after The Washington Post reported on 2019 budget documents from the Trump administration that call for a 72 percent cut to the Department of Energy’s Office of Energy Efficiency and Renewable Energy. According to the Post, the White House proposed deeper cuts to renewables and efficiency programs than the Department of Energy had asked for. The 2019 requested cuts are even more drastic than Trump’s 2018 budget, which was never put in place. 

While budgets are ultimately vetted and decided by Congress, the leaked 2019 budget indicates that clean energy will continue to face an uphill battle under Trump. The administration asserts that it supports clean energy as part of an “all-of-the-above” energy strategy.