WASHINGTON — Republicans in the U.S. Senate blocked passage of a $54 billion bill to fund transportation and housing projects on Thursday, setting up a major clash over spending levels in September and risking a government shutdown.

The Democratic-controlled Senate voted 54-43 to end debate on the measure, failing to achieve the 60 votes needed to advance to a simple up-or-down majority vote, as Republicans complained it spent too much.

On Wednesday, the majority Republicans in the House of Representatives halted consideration of a much more austere $44 billion transportation/housing bill, as some Republicans had joined Democrats to say the spending cuts were too deep.

In the Senate, just one Republican voted to advance the transportation measure, Susan Collins of Maine, while several others on the Senate Appropriations Committee who had supported it switched their votes.

Sen. Angus King, I-Maine, criticized efforts to block the measure.

“Today’s vote to not move forward with the Transportation and Housing appropriations bill is another example of that same type of unacceptable obstructionism. Senator Collins and Senator [Patty] Murray moved the Transportation and Housing appropriations bill through committee in a bipartisan manner and to the floor in an open and fair process, and I applaud their leadership. Senator Collins has acted in the highest tradition of the Senate in this matter, putting her country before party, and I deeply respect her for it. That our Republican colleagues filibustered the legislation, after years of having called for this type of process, is disappointing and truly regrettable,” King said.

Senate Republican leader Mitch McConnell had called on his party to block the bill, saying Democrats were trying to spend far more that is allowed under the across-the-board federal spending cuts known as sequestration.

Those cuts were set in motion by a 2011 budget deal after Congress failed to agree on other deficit reduction measures. They went into effect in March and are now causing hundreds of thousands of temporary layoffs at government agencies and defense contractors.

When Congress returns in September from a five-week recess that starts on Friday, it will need to pass a stopgap measure to fund government agencies and discretionary programs in the new fiscal year that starts Oct. 1. Without such new spending authority, the government faces a massive shutdown.

But agreeing on that will require the Democratic-led Senate and Republican-led House to bridge a $91 billion gap on their top-line discretionary spending levels and reconcile even deeper differences on spending for domestic programs such as community development grants and the Environmental Protection Agency.

“We needed to indicate that we’d keep our word” to maintain spending cuts, McConnell said, explaining the vote. He dismissed suggestions that a primary re-election challenge he faces from a conservative tea party-backed candidate in his home state of Kentucky influenced his stance on the issue.

Murray, D-Wash., Senate budget committee chairman, complained that Senate Republican leaders “threw a tantrum” in blocking the bill.

“Senate Republicans chose gridlock over jobs,” she added.