WASHINGTON — In a major setback for President Obama, the Senate on Tuesday blocked consideration of his $447 billion jobs bill, forcing the White House and Congressional Democrats to scramble to salvage parts of the plan, the centerpiece of Mr. Obama’s push to revive a listless economy.

The legislation, announced with fanfare by the president at a joint session of Congress last month, fell short of the 60 needed to overcome procedural hurdles in the Senate.

The vote in favor of advancing the bill on Tuesday was 50 to 49. Two moderate Democrats facing difficult re-election campaigns, Senators Ben Nelson of Nebraska and Jon Tester of Montana, joined a solid phalanx of Republicans in opposition. In addition, the Senate majority leader, Harry Reid, Democrat of Nevada, switched from yes to no so that he could move to reconsider the vote in the future.

Given Mr. Obama’s repeated demands, as he traveled the nation in recent weeks, that Congress pass the bill intact, the Senate’s vote to block the measure represented a significant setback and came after leaders of his own party had adjusted the measure to include a surtax on incomes of more than $1 million to round up additional Democratic votes.