The Senate rushed to approve a $1.3 trillion government funding bill early Friday morning, sending the mammoth legislation to President Trump's desk less than 24 hours before a deadline to avert another government shutdown.

Senators voted 65-32 on the measure, well over the simple majority needed to approve it, despite late drama after the bill easily cleared the House on Thursday afternoon. It now goes to the White House where Trump is expected to sign it.

The vote early Friday morning came after conservatives, including libertarian-minded GOP Sen. Rand Paul (Ky.), backed down from a showdown that could have forced a brief, hours-long partial closure of the federal government.

Sen. Jim Risch (R-Idaho), who held a late meeting with Majority Leader Mitch McConnell (R-Ky.) and Majority Whip John Cornyn (R-Texas), was reportedly also holding up the bill.

Risch declined to comment when asked if he was objecting to the bill, which funds the government through the end of September.

"No. What part of no don't you understand?" he told reporters between votes. "Do I have a problem with my English? I don't have any comment."

Shortly before the Senate voted on the omnibus spending bill, the chamber adopted an enrollment correction to strike a provision renaming a wildlife refuge after a former political rival of Risch.

But the provision would need to pass the House, which members of Senate GOP leadership said would not happen. Cornyn told reporters that the provision about the name of the wilderness preserve would not be changed because "there's an objection in the House."

Sen. Roy Blunt (R-Mo.), asked how the situation was resolved, appeared to turn around to check that Risch, who had just walked by, was no longer behind him.

Blunt said "whatever was in the bill" was staying in the legislation.

Senators going into Thursday evening were bracing for a potentially long weekend due to apparent objections to the bill from select lawmakers.

Under Senate rules, any one member could have delayed an initial vote until early Saturday morning, roughly an hour after the funding deadline.

Paul kept his colleagues in the dark throughout Thursday, before telling reporters after 11 p.m. that he would let the bill go through.

"You know my opposition to the bill still remains strong ... [but] I just don't have enough votes to win," he said. "It's about trying to determine how we can best get our message across."

As Paul was speaking to reporters, Sen. Kamala Harris (D-Calif.) came up behind him and appeared to jokingly make a choking motion as she walked by.

Paul's shift came after he hinted in a tweet and Fox News appearance after 8 p.m. that he would allow the vote to take place.

Lawmakers noted that the bill ultimately had the votes to pass, allowing the chamber to leave for a two-week recess on Friday as scheduled.

"I think people realize the handwriting is on the wall," Cornyn, the No. 2 Senate Republican, said amid speculation that Paul might force another hours-long shutdown.

"I just figured I would let him speak up if he wants to speak, and if he doesn't we'll vote."

GOP Sen. John Kennedy (La.) said on Thursday morning that he was undecided about whether or not he would let leadership speed up the votes. But he said after a closed-door caucus lunch that while supporting the bill was a "bridge too far," he wouldn't prevent the legislation from quickly moving forward.

The colossal funding package, which funds the government through Sept. 30, includes $695 billion in defense funding and $591 billion in nondefense funding.

The funding boost comes after Congress passed a budget deal last month that raised the spending caps by $80 billion for defense and $63 billion for nondefense and set similar increases for 2019.

Conservative lawmakers objected to the higher spending levels, as well as litany of unrelated issues stuck into the funding bill that is expected to one of the last major pieces of legislation Congress passes before the midterm election.

The budget deal, along with the GOP's signature tax-cut legislation, will add around $2.4 trillion to the national debt over the next decade, according to a study by the Committee for a Responsible Federal Budget released earlier this month.

"I could not be more discouraged about where we are today with our adult leadership here in Congress and at the White House. This is one of the most grotesque pieces of legislation I can remember," said GOP Sen. Bob Corker (Tenn.).

Corker posed a brief, last-minute hurdle to the bill as McConnell tried to move to the omnibus votes. The Tennessee senator questioned the GOP leader on what was forcing lawmakers to go so late and why they didn't vote later Friday morning.

"In the future [we should] either finish our business at a normal time or come back the next morning. This is a ridiculous process that we go through where people extort us until we get so tired that we're willing to do whatever," Corker said.

McConnell quipped back that he was "very sorry" Corker, who plans to retire after this year, "has decided to leave the Senate, given how much he's obviously enjoyed it today."

Other lawmakers grumbled about the breakneck pace of the more than 2,000 page bill, which cleared Congress roughly 24 hours after it was publicly released, giving members little time to read and digest the legislation in its entirety.

"This is a great dane-sized whiz down the leg of every taxpayer," Kennedy said.

But with a wide array of legislative priorities included in the bill, leadership on both sides claimed the funding legislation as a win.

McConnell pointed to the increase in defense funding, calling it a "top priority" for Republicans.

"First and foremost, in my view, this bill will mark the end of disproportionate and harmful cuts to Department of Defense funding. It delivers the largest year-on-year increase in defense spending in fifteen years," he said.

Meanwhile, Senate Minority Leader Charles Schumer (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.) held a joint press conference on Thursday to tout provisions their party secured in the legislation.

"It was weeks of pain-staking negotiations," Schumer said. "We Democrats are really happy with what we were able to accomplish on a number of priorities."

He added that "this spending agreement brings the era of austerity to an unceremonious end."

The legislation includes $1.6 billion for Trump's U.S.-Mexico border wall that includes 33 miles of new border fencing - not a concrete wall - that was already authorized through the 2006 Secure Fence Act.

Trump claimed victory over the funding, saying in a tweet that he "got $1.6 Billion to start Wall on Southern Border, rest will be forthcoming."

But Schumer hit back, noting that the new fencing had to be see-through, unlike a physical wall, which he argued was "consistent with the border security" Democrats support.

Negotiators also worked out a deal on funding for the Gateway project, a rail and tunnel initiative connecting New York and New Jersey.

Trump had caused temporary heartburn among GOP leadership earlier this week over concerns that he could veto the massive bill. Trump issued the threat on the initial $900 million Gateway request from regional lawmakers including Schumer. The compromise knocks the figure down to $541 million.

The omnibus also included a narrow bill aimed at bolstering the National Instant Background Check System (NICS). The legislation, known as Fix NICS, would reinforce existing laws by ensuring that authorities report criminal records to the system and penalizing agencies that don't.

It also included school safety measures and cleared the path for federal researchers to examine gun violence as a public health threat.

Democrats believe the Fix NICS bill doesn't go far enough in the wake of last month's high school shooting in Parkland, Fla. Schumer said he asked for a vote on background checks but Republicans said "no."

The bill does not address two controversial issues: A fix for the Deferred Action for Childhood Arrivals (DACA) program or key ObamaCare payments.

While debate over DACA has largely stalemated, Trump blasted Democrats for the immigration deal not being in the bill.

"Democrats refused to take care of DACA. Would have been so easy, but they just didn't care," he said in a tweet. "I had to fight for Military and start of Wall."

Updated: 1:39 a.m.