The Senate on Dec. 2 passed a Republican bill overhauling the tax code. The bill passed by a 51-49 vote. (Bastien Inzaurralde/The Washington Post)

As a good portion of Americans were sleeping, Senate Republicans passed a $1.5 trillion tax bill in the wee hours of Saturday morning.

The bill squeaked through the Senate in a 51 to 49 vote, almost entirely along party lines. Sen. Bob Corker (Tenn.) was the only Republican who — along with all Democrats — voted against the bill.

Corker, who is not seeking reelection, expressed concerns over the bill contributing to the growing national debt. But to hear most GOP lawmakers tell it, the legislation was a victory to be cheered and, at last, an achievement to be flaunted heading into next year’s midterm elections.

Democrats told a different story leading up to the vote — in part because, for much of the day, there was no bill to be seen.

Only “a few hours before the vote” was a draft of the tax bill distributed to lawmakers, according to Sen. Jon Tester (Mont.), one of the many Democrats who took to Twitter to lambaste the hasty process Friday night as the vote neared.

“Hey, happy holidays, everybody,” Tester said in a video posted just after 7 p.m. “It’s the night we’re going to be voting on the tax bill. I just got the tax bill 25 minutes ago.”

In both hands he held a ream of paper several inches thick, then set it on his desk with a thud. From the top of the 479-page pile, he plucked a page that contained handwritten edits scrawled in the margin.

“I want you to take a look at this, folks. This is your government at work,” Tester said in the video. “Here’s the bill as it’s written. Here’s the modifications that are in it . . . Can you tell me what that word is?”

The camera zoomed into a cursive word that looked, at first blush, something like “attributabnto.”

“This is Washington, D.C. at its worst,” Tester wrote on Twitter. “Montanans deserve so much better.”

Sen. Jon Tester (D-Mont.) expressed his frustration on Twitter on Dec. 1 upon receiving a 479-page tax bill only hours before the vote. (Senator Jon Tester)

Many Democrats also zeroed in on the manual edits as evidence that Republicans were carelessly ramming the bill through the Senate without thorough consideration.

“ . . . if you are so intent on forcing middle class families to foot the bill so your donors can have a tax break, at least have the decency to find a printer,” House Minority Leader Nancy Pelosi (Calif.) tweeted at Senate Majority Leader Mitch McConnell (R-Ky.), appending her message with the hashtag #GOPTaxScam.

Shortly after receiving the draft bill, Sen. Robert Menendez (D-N.J.) posted two pages that were crossed out and thus seemed to be irrelevant. Or were they?

“Okay this is absurd,” Menendez observed. “Is that a crossout? Is this page part of the bill? WHY AM I ASKING THESE QUESTIONS HOURS BEFORE WE VOTE ON IT??”

“How about we take a break until you can type at least this thing up? Maybe read it and get some nonpartisan analysis?” Sen. Robert P. Casey Jr. (D-Pa.) tweeted at the Senate GOP. It was unclear if Casey was tweeting an earnest proposal, sarcastically in resigned jest, or a combination of both. Regardless, an actual push Friday by Senate Minority Leader Charles E. Schumer (D-N.Y.) to give senators more time to read the tax bill failed after every Republican voted no.

Several other Democrats tweeted about the same page Tester highlighted (reportedly page 257), including Sens. Richard J. Durbin (Ill.), Christopher A. Coons (Del.) and Heidi Heitkamp (N.D.).

Sen. Elizabeth Warren (Mass.) attempted to read the same handwritten passage on video, but couldn’t get all the way through.

“This is how we’re writing legislation now?” Sen. Mark R. Warner (Va.) asked on Twitter.

Rep. Don Beyer (Va.) replied sardonically: “Don’t worry @MarkWarner — it’s just a rewrite of the entire US tax code being scribbled down on pieces of paper. What could go wrong?”

Inevitably, page 257 got the Photoshop treatment. Sen. Claire McCaskill (Mo.) added an image of Monopoly’s mascot, “Rich Uncle Pennybags,” to the bottom of the page, implying the tax bill would only make the rich richer.

“So here’s one example of crazy-town tonight,” McCaskill tweeted. “Drawing is my editorial comment.”

Sen. Martin Heinrich (D-N.M.) edited the page to appear as if it was from an opening scene of “The Simpsons,” with the text of the bill nothing more than something Bart Simpson was assigned to scribble on the chalkboard as punishment.

“Don’t worry, nothing to see here folks,” Heinrich tweeted.

In response to Durbin’s tweet, Sen. Tammy Duckworth (Ill.) posted a picture of her 3-year-old daughter, Abigail, seated at a sheet of paper with abstract crayon scribbles. Perhaps Abigail could get a job helping Senate Republicans write the tax bill, Duckworth wrote.

For what it’s worth, Republicans seemed unperturbed at Democrats’ criticism. (As one conservative think tank president shot back: “The Declaration of Independence was handwritten. Somehow we managed ok.”)

After the bill passed early Saturday morning, McConnell hailed it as “once-in-a-generation” legislation at a news conference.

“The American people wanted change,” Sen. John Barrasso (R-Wyo.) said. “We were able to deliver.”

Notably, Corker, the lone Republican holdout, refrained from commenting on the handwritten edits or the rushed process. Hours before the vote, however, he expressed disappointment at the bill and the effect he felt it would have on “pro-growth policies.”

“This is yet another tough vote. I am disappointed. I wanted to get to yes,” Corker said in a lengthy statement. “But at the end of the day, I am not able to cast aside my fiscal concerns and vote for legislation that I believe, based on the information I currently have, could deepen the debt burden on future generations.”

An earlier version of this report incorrectly said Sen. Christopher A. Coons represents Connecticut. He represents Delaware. This version has been corrected.

Read more:

Here’s how income tax cuts will affect individual senators (and you)

Here are 7 differences Republicans must resolve between the House and the Senate tax bill proposals

Republicans once predicted disaster from one-party bills. They just passed one on their own.