House Speaker Paul D. Ryan (R-Wis.), who announced Wedneday he will not run for reelection, arrives for a meeting with Donald Cravins Jr. of the National Urban League, left, and Elroy Sailor, a Republican strategist, right, at the Capitol on Thursday. (J. Scott Applewhite/AP)

After passing tax cuts and spending that added massively to the deficit, congressional Republicans made a show of fiscal austerity Thursday by voting for a ­balanced-budget amendment to the Constitution.

As expected, the measure failed, falling short of the two-thirds vote needed to advance. The vote was 233 to 184.

The measure came to the floor a day after House Speaker Paul D. Ryan (R-Wis.) surprised lawmakers by announcing plans to retire at the end of the year.

Not even its supporters had expected the balanced-budget amendment to pass the House. But congressional conservatives, many of whom opposed last month’s $1.3 trillion “omnibus” bill over what they viewed as its excessive domestic spending, nonetheless pushed for the vote, presenting it as a necessary tonic after Congress’s recent budget binge. The giant government-wide spending bill has caused a backlash from the Republican base — frustrating President Trump, who voiced displeasure with the bill and briefly threatened to veto it.

“It’s basically fulfilling your promises,” said Rep. Mark Walker (R-N.C.), chairman of the conservative Republican Study Committee, which secured a commitment for the balanced-budget vote last fall. “I know it kind of looks more showy coming out of response of a lot of the Republican base regarding the omnibus, but this is something in all fairness that had been worked on. And that’s why I don’t necessarily understand all the criticism, because this has been in the works for some time.”

The vote on the balanced-budget amendment is expected to be followed in coming weeks by a related push by the White House and GOP leaders to take back billions of dollars from last month’s $1.3 trillion government spending bill via an obscure process called “rescission.” That effort, too, is designed to appease conservatives, but it also appears destined to fail.

The criticism of the ­balanced-budget amendment came from Democrats who denounced it as an exercise in political posturing that, if enacted, would result in steep cuts to Medicare and Social Security.

“This legislation is a brazen assault on seniors, children and working families — the American people we were elected to protect,” said House Minority Leader Nancy Pelosi (D-Calif.). “Make no mistake, this GOP con job has nothing to do with fiscal responsibility.”

Some Republicans, too, criticized the vote as a pointless performance.

Amending the Constitution requires approval by a two-thirds vote in the House and the Senate, as well as ratification by three-fourths of the states. Those are steep hurdles, and the legislation looked just as unlikely to pass the Senate as the House, though Senate Majority Leader Mitch McConnell (R-Ky.) expressed interest this week in taking it up.

“What a joke. What a joke. It is the biggest joke in the world,” said Sen. Bob Corker (R-Tenn.). “It’s a way for people to hide behind making tough decisions. I’m for a balanced-budget amendment, but the way it’s drafted, it’s just to give people cover. We’ve got the House, the Senate and the presidency. If we wanted to figure out a way to balance the budget we could do it.”

Conservative Rep. Mo Brooks (R-Ala.) voiced a similar complaint, saying he was concerned that the legislation “may deceive the public into thinking that it is a substantive balanced-budget amendment, which it is not.”

“In fact, the public should be looking at the spending bills that we just passed, an $800-some-odd-billion-dollar deficit that is projected this year, with a Republican House, Republican Senate, Republican White House,” Brooks said.

Congress has taken votes on balanced-budget amendments in the past, though not since 2011 — when Republicans were hammering President Barack Obama for presiding over growing deficits in the wake of the global financial crisis. In that instance, neither the House nor Senate voted to advance the measure.

This week’s vote comes three days after the Congressional Budget Office projected drastically growing deficits, hitting $1 trillion and above starting in 2020, partly as a result of the new GOP tax law and the omnibus spending bill. Actions taken by the GOP Congress and Trump since June are “estimated to make deficits $2.7 trillion larger than previously projected” in the next decade, the CBO said.

Given those figures, some Republicans are privately questioning the timing of the amendment vote.

“It draws attention to a subject that we shouldn’t be drawing attention to,” said a Republican lawmaker who spoke on the condition of anonymity to comment candidly on party strategy. “Frankly, the Democrats ought to be making that push, not us.”

The size of the spending bill has prompted such heartburn and complaints among conservatives that the White House is working with Majority Leader Kevin McCarthy (R-Calif.) on a rescissions request that would seek to pare $30 billion to $60 billion from the legislation. But this, too, is dividing Republicans, winning strong support from conservatives but angering members of the spending committees in both the House and the Senate, making its passage through either chamber look questionable.

Several Appropriations Committee members noted that last month’s government spending bill, needed to stave off a shutdown, was the product of negotiations between Republican and Democratic congressional leaders in each chamber as well as the White House. Republicans sought and achieved major increases in defense spending; Democrats demanded big increases in domestic spending in exchange, and they got that.

House Appropriations Committee Chairman Rodney Frelinghuysen (R-N.J.) dismissed the rescissions effort in brief comments this week, echoing other appropriators who warned that reneging on the deal would hamstring future negotiations: “Keeping your word is pretty important,” Frelinghuysen said.

Rep. Tom Cole (R-Okla.), another senior member of the Appropriations Committee in the House, said the rescission effort is “unrealistic and dangerous.”

“I mean, it’s hard enough to make a bargain around here. You can’t break your word the minute you give it. And that’s basically what a rescission package in my view would be.”

Still, other Republicans said that with tough midterm elections approaching, the party must take steps to energize a GOP base that at this point appears to be lagging behind Democrats in enthusiasm.

“We need to start doing things that shows our base that we are really conservative,” said Rep. Dennis A. Ross (R-Fla.), who just announced plans to retire. “And as you know there’s a lot of our base, and some even moderates, that were upset because of the omnibus. But when you see what the [military] is going through with all these training accidents, we had to do what we had to do, but now we need to show the American people that we’re serious about getting our house in order.”