The Senate approved a $37.5 billion energy and water spending bill Thursday, the earliest an appropriations bill has passed the upper chamber in the last 40 years.

The Energy and Water Appropriations Bill of 2016 sets out funding for the Department of Energy, Department of the Interior, Army Corps of Engineers, the Nuclear Regulatory Commission and other federal agencies. It's the first appropriations bill to pass the Senate this year and was approved with a huge bipartisan majority, 90-8.

Sen. Lamar Alexander, R-Tenn., touted the bill as the earliest the Senate has passed an appropriations bill in four decades, according to the Congressional Research Service, and the first time an energy and water appropriations bill has gone through the regular Senate process since 2009.

"What we've done, with the cooperation of the Senate, in the last couple weeks was to pass the first Senate appropriations bill and to do it earlier than its been done in the last 40 years," Alexander said.

It took more than three weeks for the Senate to vote on the bill after it was caught up in a controversy over the Iran nuclear deal. Sen. Tom Cotton, R-Ark., introduced an amendment to keep the Department of Energy from purchasing heavy water from Iran in the future, which Democrats blocked, calling it a "poison pill."

On Wednesday, Democrats killed Cotton's amendment and allowed the bill to finally move to a final vote.

Alexander worked with Sen. Dianne Feinstein, D-Calif., on forming the bill. They congratulated each other on getting the bill passed on Thursday.

Feinstein touted the bill as containing $1.4 billion more for the Army Corps of Engineers than President Obama asked for in his budget — the executive budget typically lowballs its request for the Corps because Congress ultimately will make up the difference — and $163 million more for the Bureau of Reclamation than Obama asked for.

The bill includes $100 million to help fight drought in the West, Feinstein said.

"Not only are we passing a bill, we're passing a good bill," she said.

Among the other provisions in the bill that Alexander praised were provisions that would help safely dispose of nuclear waste, clean up hazardous materials and the projects that the Army Corps of Engineers would help complete across the country.

Alexander said the inclusive process of passing the bill allowed many senators to feel like they had a stake in the bill, which is why it passed with such a huge majority.

"There's a great deal included in here that every senator can be proud of," he said.