Two key U.S. allies are engulfed in vicious wars. A disruptive government shutdown is looming in just over a month. Americans are held hostage overseas by hostile forces. Uncertainty ripples across the country.

House Republicans, meanwhile, are consumed with an extended struggle of personal grievance, petty beefs, political payback and rampant attention-seeking that on Thursday night forced Representative Steve Scalise of Louisiana to withdraw as his party’s candidate for speaker. The tumult has sidelined Congress at a critical moment and rendered the Capitol a bastion of G.O.P. dysfunction. The spectacle of their infighting is even more glaring at a moment of international crisis, a fact not lost on Republicans themselves as they remain unable to settle on a speaker who could put the House back in business.

“We are living in a dangerous world; the world’s on fire,” Representative Michael McCaul, the Texas Republican who chairs the Foreign Relations Committee, said on Thursday after leaving a closed meeting where Republicans groped unsuccessfully for a path out of their stalemate. “Our adversaries are watching what we do — and quite frankly, they like it.”

“I see a lot of threats out there,” he added, referring ominously to the ongoing disarray among his own colleagues unfolding in the Capitol basement. “One of the biggest threats I see is in that room, because we can’t unify as a conference and put the speaker in the chair together.”

In past moments of crisis, such as the aftermath of the Sept. 11, 2001, attacks, lawmakers have been able to set aside personal and political differences, if only temporarily, to show a unified front to reassure the country and the world. But there was no sign on Thursday that Republicans were ready to end their bickering despite the press of world events and it was unclear how they could right the ship after Mr. Scalise’s wrenching decision.

After a historic vote to remove their own speaker last week, they appeared on the verge of a quick recovery on Wednesday when G.O.P. lawmakers met and voted narrowly to nominate Mr. Scalise, the No. 2 Republican, to succeed former Speaker Kevin McCarthy. But it quickly became clear that Republicans were not willing to put aside their divisions and support him on the House floor. In quitting the fight on Thursday night, Mr. Scalise said some of his colleagues had “their own agendas.” Some were dug in for Representative Jim Jordan, the hard-right Ohio Republican who co-founded the House Freedom Caucus and challenged Mr. Scalise for the nomination, falling just 14 votes short.

Others simply refused to commit.

Trying to stem the momentum against him, Mr. Scalise on Thursday had summoned his colleagues for yet another private meeting that stretched long into the afternoon in what one Republican described as an airing of slights big and small worthy of Festivus, a parody holiday. Lawmakers warned they were hurting not only their own image, but the nation’s as well.

“It sends a terrible signal,” said Representative Don Bacon, a Nebraska Republican and former Air Force general whose swing district seat could be at risk if his party is deemed by voters to be incapable of governing. “We’re not a governing body and we should be.”

The concern overseas about what is transpiring as Israel engages with Hamas and Ukraine with Russia is real. Senator Chris Coons, Democrat of Delaware, in Europe during a Senate recess for meetings with high-level officials, said he faced persistent questions about the U.S. commitment in those regions and the instability in the House.

“This is a critical time for us to show we can govern and reasonably engage with our allies in the face of a dangerous world,” he said.

Representative Mike Quigley, Democrat of Illinois, expressed a similar sentiment, saying the situation in the House went beyond intramural Republican politics.

“This paralysis isn’t just an inconvenience,” he said. “It leaves our nation vulnerable. It shows the world — allies and enemies — that we can’t govern.”

The differences among Republicans blocking a new speaker hardly seem insurmountable. They are all essentially conservatives at varying points along the ideological spectrum. What does seem insurmountable, at least for now, is the refusal of some members to rise above their differences. There is a distinct bloc of House Republicans who refuse to give ground even with their party’s national and international image at risk.

Mr. McCarthy’s backers remain angry about his removal and vow to vote for him again. Mr. Scalise’s backers are upset at the immovable McCarthy supporters. Mr. Scalise’s opponents portrayed him as too much a product of the establishment, while Jordan critics see him as too anti-government.

Representative Chip Roy, Republican of Texas, was miffed that his plan to change the internal election process was summarily dismissed on Wednesday, clearing the way for Mr. Scalise to win the nomination with a simple majority vote before he opted out. Mr. Roy said other holdouts were also worried that Mr. Scalise’s health — he is being treated for blood cancer — could suffer were he to win the gavel.

Then there are those who simply love the spotlight that comes with being one of the lawmakers standing in the way of someone occupying the speaker’s chair. Representative Greg Murphy, Republican of North Carolina, went after fellow Republican Nancy Mace of South Carolina on X, formerly Twitter, accusing her of attacking Mr. Scalise’s record on race to gain attention.

“The 24 hr news cycle has destroyed Congress,” Mr. Murphy wrote.

It didn’t help that former President Donald J. Trump happily fanned the flames by opposing Mr. Scalise. Then there was Representative George Santos, the newly re-indicted New York Republican, who stoked the disarray himself by refusing to back Mr. Scalise and helping keep the House frozen at a time when his colleagues might be tempted to toss him out if they could restore order.

Some Republicans dismissed the concern about the state of the House and its impact on national and world affairs. Mr. Roy called such fears a “swamp concern,” referring derisively to institutional Washington.

“The whole universe doesn’t revolve around this building,” he said of the Capitol. “If something happens, you can act.”

Even if Republicans can somehow decide on a speaker, it hardly means a return to smooth governing. Anyone selected will confront a learning curve atop a fractured majority and face pressure to hold the line on deep spending cuts in upcoming fiscal negotiations with the Senate and White House to avert a shutdown. Their colleagues will be watching closely to see how they handle it.

The next speaker will also have to negotiate rising Republican resistance to extending financial assistance to Ukraine, while the pressure will be on to provide Israel with whatever it needs in the conflict with Hamas.

Before whoever emerges as speaker gets to that point, House Republicans must first find a way out of a leadership vacuum that some Republicans worry has morphed from a brief, embarrassing interlude for their party into something more sinister.

“This is a bad episode of ‘Veep,’” said Representative Nicole Malliotakis, Republican of New York, “and it’s turning into ‘House of Cards.’”

Luke Broadwater, Catie Edmondson and Annie Karni contributed reporting.