House Republicans chose and then quickly repudiated yet another of their nominees for speaker on Tuesday and rushed to name a fourth, pressing to put an end to a remarkable three-week-long deadlock that has left Congress leaderless and paralyzed.

Representative Mike Johnson, a little-known social conservative from Louisiana, emerged on Tuesday night as the latest contender for the post after Representative Tom Emmer of Minnesota, the No. 3 House Republican, dropped his bid only hours after securing the nomination. Mr. Emmer’s downfall followed a swift backlash from the right, including former President Donald J. Trump, that left his candidacy in shambles and the G.O.P. as divided as ever.

But by late Tuesday night, Mr. Johnson appeared to have put together a coalition that brought him closer to capturing the speakership than any candidate has been since hard-right rebels deposed former Speaker Kevin McCarthy three weeks ago. Though it was not certain he had the votes to be elected, he said he planned to call for a floor vote on Wednesday at noon.

“Democracy is messy sometimes, but it is our system,” Mr. Johnson said, standing beside dozens of other Republicans in a show of unity after he was nominated. “This House Republican majority is united.”

The selection of Mr. Johnson, 51, was the latest abrupt turn in a chaotic leadership battle among House Republicans in which they have lurched from one speaker nominee to another — first a mainstream conservative, then a far-right rabble rouser, then another mainstream candidate and now another conservative hard-liner — putting their rifts on vivid display.

A social conservative, Mr. Johnson is a lawyer and the former chairman of the Republican Study Committee. He served on former President Donald J. Trump’s impeachment defense team, played a leading role in recruiting House Republicans to sign a legal brief supporting a lawsuit seeking to overturn the 2020 election results and was an architect of Mr. Trump’s bid to object to certifying them in Congress on Jan. 6, 2021.

Pressed by reporters on Tuesday night about his efforts to overturn the election, Mr. Johnson smiled and shook his head, saying, “next question,” as Republicans beside him booed.

“Shut up! Shut up!” yelled Representative Virginia Foxx of North Carolina, the chairwoman of the Education Committee.

Last year, Mr. Johnson, an evangelical Christian, sponsored legislation that would effectively bar the discussion of sexual orientation or gender identity at any institution serving children younger than 10 that receives federal funds.

He has also opposed continued funding for the war in Ukraine, which has emerged as a bitter fault line in the G.O.P. and in the spending battles that any new speaker will have to navigate in the coming days.

In a secret-ballot vote on Tuesday night, Mr. Johnson got 128 votes, with 44 Republicans voting for nominees not on the ballot, including 43 for Mr. McCarthy, whom many view as unfairly ousted. Still, in a separate vote afterward, only a few Republicans indicated they would not back Mr. Johnson on the floor, while about 20 Republicans were absent.

Any candidate for speaker can lose only a handful of votes and still win the speakership because Republicans hold such a small majority in the House.

The glimmer of consensus came only hours after Mr. Emmer’s abrupt exit made him the third Republican this month to be chosen to lead the party, only to have his bid collapse in a seemingly endless cycle of G.O.P. grievances, personality conflicts and ideological rifts.

Republicans have now spurned all three of their top leaders over the past few weeks. The chamber has been frozen for the better part of a month as Republicans feud over who should be in charge, even as wars rage overseas and a government shutdown approaches.

“It’s a pretty sad commentary on governance right now,” said Representative Steve Womack of Arkansas, adding: “The American public cannot be looking at this and having any reasonable confidence that this conference can be governed. It’s sad. I’m sad. I’m heartbroken.”

Mr. Emmer’s demise was the latest evidence of the seemingly unending Republican dysfunction. He began the day with a scant victory, winning an internal party nominating contest by a vote of 117 to 97 over Mr. Johnson.

But immediately after Mr. Emmer’s nomination, about two dozen right-wing Republicans indicated that they would not vote for him on the floor, denying him the majority he would need to succeed in a vote of the full House. And as he met with holdouts to try to win them over, Mr. Trump issued a scathing statement on social media expressing vehement opposition to Mr. Emmer, calling him a “Globalist RINO” — short for “Republican in name only” — whose elevation would be a “tragic mistake.”

“I have many wonderful friends wanting to be Speaker of the House, and some are truly great Warriors,” Mr. Trump wrote on Truth Social. “RINO Tom Emmer, who I do not know well, is not one of them. He never respected the Power of a Trump Endorsement, or the breadth and scope of MAGA—MAKE AMERICA GREAT AGAIN!”

A majority of those opposed to Mr. Emmer were members of the ultraconservative House Freedom Caucus and loyal to Mr. Trump.

Only hours later, Mr. Emmer told Republicans in a closed-door meeting that he was dropping his bid, according to a person familiar with his decision who divulged the private discussion on the condition of anonymity. He then quickly left the room, avoiding reporters’ questions.

By Tuesday evening, five more Republicans, none with a national profile, were vying for the nomination. Mr. Johnson won after multiple rounds of ballots, beating out Representative Byron Donalds of Florida, a member of the Freedom Caucus.

The Republican disarray underscored a new ethos that has gripped the House G.O.P.: Dozens of members have abandoned the old norms of respecting the winner of the party’s internal elections, and instead are acting according to their individual preferences, ideologies and allegiances.

Some hard-right Republicans consider themselves a distinct political party from their more mainstream, business-minded colleagues, whom they accuse of being in a “uniparty” with Democrats.

The House has been in a state of uncertainty and chaos since Oct. 3, when rebels forced a vote to oust Mr. McCarthy as speaker. Eight Republicans backed that move along with Democrats, who remained united behind their own leader, Representative Hakeem Jeffries of New York. Republicans had cast aside two previous winners of their closed-door nominating process — Representative Steve Scalise of Louisiana and Representative Jim Jordan of Ohio — before settling on Mr. Emmer.

Some on the right opposed to Mr. Emmer cited his vote in favor of codifying federal protections for same-sex couples. Others railed against Mr. Emmer’s vote in favor of a stopgap spending bill put forward by Mr. McCarthy, the speaker at the time, to avert a government shutdown. Still others said he was insufficiently loyal to Mr. Trump, because he voted to certify the results of the 2020 election won by President Biden.

Mr. Emmer had attempted to mollify Mr. Trump by calling him over the weekend and praising him, according to the former president. But Mr. Trump made clear he had not been won over.

“I believe he has now learned his lesson, because he is saying that he is Pro-Trump all the way, but who can ever be sure?” Mr. Trump wrote. “Has he only changed because that’s what it takes to win? The Republican Party cannot take that chance, because that’s not where the America First Voters are. Voting for a Globalist RINO like Tom Emmer would be a tragic mistake!”

Robert Jimison contributed reporting.