The Senate has passed a massive "omnibus" spending package that will fund the government and avert a looming government shutdown. The legislation, which narrowly passed the House early Friday morning, spends $1.3 trillion to keep the government open through the end of September.

It passed the Senate with 65 yeas to 32 nays. A shutdown would have been the third this year so far.

The spending package raises both military and domestic spending, leading to support from Republicans and Democrats alike. According to Office of Management and Budget director Mick Mulvaney, President Trump supports the legislation and will sign it into law.

The bill had its critics, too, though. Sen. Rand Paul, R-Kentucky, objected to the amount of money that the bill spends, what it spends that money on, and the process used to draft the legislation. Numerous House Republicans had similar objections on Thursday, with many of them protesting that they were voting on a bill they had not yet had time to read.

Shame, shame. A pox on both Houses - and parties. $1.3 trillion. Busts budget caps. 2200 pages, with just hours to try to read it. — Senator Rand Paul (@RandPaul) March 22, 2018

Paul hunkered down in his office during the afternoon and early evening saying he wanted to read the 2,232 page bill before he would agree to let leadership move the bill under an expedited process. He could not have stopped the bill on his own, but he could have caused a brief government shutdown from Friday midnight to early Saturday morning if he had made Republican leadership run the clock on all the procedural votes on the measure. Shortly after 8 p.m. Thursday night Paul tweeted that he would not prolong debate and he would let the legislation proceed on an expedited track, but he would be voting against the bill.

Get Breaking News Delivered to Your Inbox

"I shared 600 pages tonight. I'm done tweeting them for the evening," Paul tweeted. "If they insist on voting, I will vote no because it spends to much and there's just too little time to read the bill and let everyone know what's actually in it. Thanks for sticking with me."

Senator James Risch, R-Idaho, then threatened to hold up the bill over a provision to rename the White Clouds Wilderness forest in Idaho after Cecil D. Andrus the late four-term Democratic governor of the state who died last year. Andrus also served as former President Jimmy Carter's Secretary of the Interior from 1977 to 1981. Risch had many conversations on the Senate floor with his colleagues and meetings with leadership in offices off the floor. In the end, he did not get the name change because the House would not accept the change to the bill.

Other senators were also critical of the bill, including Tennessee's Bob Corker, a Republican. Speaking to reporters on Thursday, he called it a "grotesque piece of legislation" that increases deficit spending despite GOP control of the government. He also said, "It's juvenile. This is a juvenile process we go through every time we do one of these."

CBS News' John Nolen contributed to this story.