The National Rifle Association mobilized members to blanket the Senate with phone calls, e-mails and letters. The group also spent $500,000 on Wednesday alone, on an advertising campaign criticizing “Obama’s gun ban” and using Mayor Michael R. Bloomberg, a deep-pocketed gun control advocate, as a foil. “Tell your senator to listen to America’s police instead of listening to Obama and Bloomberg,” the ad said.

The action on Wednesday was initially supposed to be only the first series of votes in a debate to take days if not weeks. But as the measures’ chances faded this week, Senate leaders decided to rush the process, reaching a bipartisan agreement to hold nine votes in succession, each with a 60-vote threshold for passage.

Using the 60-vote hurdle so early in the process allowed Democrats to prevent the passage of an amendment mandating that any state with a concealed-weapons law, no matter how rigorous, would have to recognize the concealed-weapons permit of residents from any other state. The amendment received 57 votes in favor, including those of 12 Democrats, and 43 votes against.

Senator Joe Manchin III, Democrat of West Virginia, a lifelong backer of the N.R.A. who also pushed for new restrictions in recent weeks, made one last plea for his amendment, which would extend background checks to Internet and gun show sales. While acknowledging that “the politics are risky,” he said it was “a defining time in politics, where you know the facts are on your side.”

The bipartisan measure, which had appeared to have a strong chance of passage, received 55 votes before Mr. Reid changed his vote to “no” to preserve the parliamentary right to bring the measure up again. Four Republicans voted “yes”: Patrick J. Toomey of Pennsylvania, a co-author of the legislation; John McCain of Arizona; Mark Steven Kirk of Illinois; and Susan Collins of Maine. An equal number of Democrats voted “no”: Mark Begich of Alaska, Mark Pryor of Arkansas, Max Baucus of Montana and Heidi Heitkamp of North Dakota. All are from states that Mr. Obama lost by wide margins last fall, and all but Ms. Heitkamp face difficult re-election campaigns in 2014.

Debate over the measures consumed the Senate on Wednesday, with speeches from both sides meant to stir emotions. “I choose to vote my conscience,” Mr. Reid said, announcing his decision to vote for the bans on assault weapons and magazines that carry more than 10 rounds of ammunition, “because, if tragedy strikes again — if innocents are gunned down in a classroom or a theater or a restaurant — I could not live with myself as a father, as a husband, as a grandfather or as a friend knowing that I didn’t do everything in my power to prevent it.”

The assault weapons vote was 40 in favor and 60 against. The magazine ban fell with 46 in favor and 54 against.