WASHINGTON — In another stinging setback for President Obama and Democrats controlling Congress, the Senate on Thursday rejected long-sought legislation to provide more stimulus spending and a reprieve for doctors about to get hit with a big cut in their Medicare payments.

The failed measure, killed by a GOP filibuster, would have provided further jobless aid for the long-term unemployed, $24 billion in aid to cash-strapped state governments, and the renewal of dozens of popular tax breaks for businesses and individuals.

Less than a week ago, Obama reissued a plea for more stimulus spending as insurance against another recession. But the measure instead fell victim to election-year anxiety over huge federal deficits, despite being pared back by Democratic leaders.

The 56-40 vote late Thursday fell four votes short of the 60 required to break the GOP filibuster. Not a single Republican supported the measure, even though nine GOP senators had supported even more costly legislation just three months ago. Ben Nelson of Nebraska was the only Democrat to vote with Republicans to filibuster the measure.

Efforts to woo a handful of Republican moderates like Maine’s Susan Collins and Olympia Snowe have yet to pan out. Further downsizing of the measure is under consideration.

There was some urgency to pass the jobless aid measure because by the end of the week, more than 900,000 people out of work for more than six months will be ineligible to apply for continued benefits, according to the latest Labor Department estimates. And doctors face a scheduled 21 percent cut in Medicare reimbursements effective today.

Congressional Democrats began the year with an aggressive agenda of passing a series of bills designed to create jobs. One has become law, offering tax breaks to companies that hire unemployed workers. Others stalled as lawmakers, after hearing from angry voters, became wary of adding to the national debt, which stands at $13 trillion.