WASHINGTON — The Senate Tuesday passed the most sweeping conservation legislation in a decade, protecting millions of acres of land and hundreds of miles of wild rivers across the country and establishing four new national monuments honoring heroes from Civil War soldiers to a civil rights icon.

The 662-page measure, which passed 92 to 8, represented an old-fashioned approach to dealmaking that has largely disappeared on Capitol Hill. Senators from across the ideological spectrum celebrated home-state gains and congratulated each other for bridging the partisan divide.

“It touches every state, features the input of a wide coalition of our colleagues, and has earned the support of a broad, diverse coalition of many advocates for public lands, economic development, and conservation,” said Senate Majority Leader Mitch McConnell, R-Ky.

It’s a paradoxical win for conservation at a time when President Donald Trump has promoted development on public lands and scaled back safeguards established by his predecessors.

The bill, which the Congressional Budget Office projects will save taxpayers $9 million, enjoys broad support in the House. The lower chamber is poised to take it up after the mid-February recess, and White House officials have indicated privately that the president will sign it.

The measure protects 1.3 million acres as wilderness, the nation’s most stringent protection that prohibits even roads and motorized vehicles. It permanently withdraws more than 370,000 acres of land from mining around two national parks, including Yellowstone, and permanently authorizes a program to spend offshore drilling revenue on conservation efforts.

The package is crammed full of provisions for nearly every senator who cast a vote Tuesday. New Mexico Sen. Martin Heinric, D, lauded the fact that it will create 273,000 acres of wilderness in his state, most of it within the boundaries of two national monuments that Trump threatened to shrink. Senate Energy and Natural Resources Committee Chairwoman Lisa Murkowski, R-Alaska, who co-authored it, inserted a provision that allows native Alaskans who served in Vietnam to apply for a land allotment in their home state.

“We have also worked for months on a bipartisan, bicameral basis to truly negotiate every single word in this bill — literally down to one one-tenth of a mile for [a] certain designation,” Murkowski said as she urged her colleagues to vote for the bill on Monday.

House Natural Resources Committee Chairman Raul Grijalva, D-Ariz., hailed it as “an old-school green deal,” saying he and the top Republican on his panel, Rep. Rob Bishop, of Utah, “are happy to work together to get this across the finish line.”

Washington Sen. Maria Cantwell, a lead Democratic negotiator on the bill, said the fact that the legislation protects so much of the nation’s prized properties won a broad constituency. “There’s some corners that tried to demonize access to public lands as — ‘oh that’s just some environmentalists and that’s it,’” she said in an interview. “And that’s not it. It’s way bigger than that.”

The legislation establishes four new monuments, including the Mississippi home of civil rights activists Medgar and Myrlie Evers and the Mill Springs Battlefield in Kentucky, home to the decisive first Union victory in the Civil War.

John Gilroy, who directs U.S. public lands conservation at The Pew Charitable Trusts, said in an interview that the package’s more than 100 provisions arose from negotiations on the local level, which provided enough momentum to overcome the typical gridlock that has come to define Capitol Hill.

“What we saw all the way through was a sincere effort to get to yes on a lot of pieces that had local support, bipartisan support and support across the two bodies,” Gilroy said.