A group of House conservatives spent almost a year dreaming big about toppling Speaker John Boehner, but less than a day before the vote, they still hadn’t found someone to replace him.

One promising candidate finally jumped in — but only at the last minute, not even telling his closest friend in Congress he was running.

Story Continued Below

The result was a vote Tuesday that ultimately yielded an ugly, controversial win for Boehner, with the most defections from his own party than any speaker has seen in decades. The Ohio Republican’s allies were left howling for revenge, and hopes of a big tea party victory once again went unfulfilled.

The contest also made a conservative hero out of Florida GOP Rep. Daniel Webster, who drew 12 of the 25 dissenting votes. But mainly, the disorganized attempt to oust Boehner was a reminder of how hard it is to unseat a speaker.

Interviews with members involved in the coup attempt show that a small band of conservatives had been actively discussing the prospect of challenging Boehner since early 2014, and had spent months slowly trying to build support. Some of them were deeply impressed with Webster, who has heard from conservatives ever since he came to Congress in 2011 that he would make an ideal speaker.

The 65-year-old had served as speaker and Senate majority leader in the Florida Legislature, where he ran an orderly ship and achieved the almost unheard-of task of ending legislative sessions on time. On Capitol Hill, Webster has impressed his fellow lawmakers with his deep respect for “regular order,” one of the biggest complaints that hard-line conservatives have about Boehner and the current GOP leadership team.

But Webster has said he didn’t decide to jump into the race until less than 24 hours before the vote. His candidacy came as a surprise to his close friend and ally Rep. Richard Nugent, a fellow Florida Republican who said Webster never told him he was running.

“We heard a rumor … the night before but he never reached out to me,” insisted Nugent. “We spend a lot of time together, but I had not had a prior conversation with him.”

Boehner unceremoniously dumped both Webster and Nugent from the elite, speaker-controlled Rules Committee right after the vote, turning both into darlings of the hard-liners, though he’s now thinking of returning Nugent to the panel.

Other obstacles for the rebels: Several freshmen voted for Boehner after promising to oppose him; other wavering Republicans changed their minds and supported the speaker after declaring they wouldn’t; and a last-minute lobbying effort by Boehner shored up enough support to get him over the top. Boehner also got lucky in that inclement weather and the funeral for the late Democratic New York Gov. Mario Cuomo caused a number of lawmakers to be absent, making it easier for Boehner to reach a majority of the members voting.

In addition, the conservatives failed to woo some of the most vocal critics of the Republican leadership team. They included Rep. Raul Labrador of Idaho, a hard-line conservative Republican who had made a point of abstaining from the 2013 speakership vote, later telling an Idaho newspaper that “there was nobody at that moment I thought would be a good speaker.”

This time, Labrador voted for Boehner, even though he appeared to refer to the anti-Boehner camp as “we” in an email he was typing on his smartphone shortly before the tally.

“The votes are not there against Boehner,” Labrador wrote on the device, which a POLITICO photographer shot from the House chamber’s balcony. He added: “I led the effort last time. … Now we need 35 and they only have 15 at most. There’s no way to get to 35.”

Labrador spokesman Dan Popkey said Thursday that the lawmaker was emailing “a longtime constituent and supporter, and he was explaining to her his vote.”

Two other critics of House leadership, Republican Reps. Jim Jordan of Ohio and Mick Mulvaney of South Carolina, also ended up backing Boehner. Boehner huddled privately with some of the members in the hours before the vote.

Rep. Ted Yoho (R-Fla.), one of the leaders of the “dump Boehner” movement, said the conservatives went into Tuesday’s proceedings thinking they had “35 to 40 votes” against the Ohio Republican, which would have been enough. Instead, Boehner got 216 of 408 votes cast, enough to avoid a second ballot that conservatives thought would have forced him to step aside.

“There’s a lot of people who said they wanted change,” Yoho noted ruefully. “Many are called, but few show up.”

Yoho had his own apparent change of heart: In October, he co-hosted a golf-outing fundraiser for Boehner in Florida, the Huffington Post reported this week.

Boehner, meanwhile, spent a long time preparing for a potential challenge.

Photo captures tea party angst. | M. Scott Mahaskey/POLITICO

After his near-death experience at the start of the 113th Congress, when a group of hard-liners almost took him out in the speakership election following the “fiscal cliff” showdown, Boehner spent big chunks 2014 on the road, raising tens of millions of dollars for his rank-and-file members. With all those political chits in his pockets, plus a strong showing by House Republicans on Election Day, Boehner and his top aides were feeling good — but not overconfident — going into the speakership vote.

Boehner had personally reached out to most members of the GOP Conference during the last few months, and he didn’t sense any serious movement to replace him, despite pockets of unhappiness.

However, the rebels had been quietly doing their own footwork for months as well, egged on by outside groups like FreedomWorks and the conservative website RedState.

Rep. Steve King, the boisterous Iowa Republican who attempted to rally lawmakers to back Webster, described the process of eliciting “no” votes as slow-moving.

“It was really pretty organic,” King declared.

Webster first started introducing himself to the more conservative members of the GOP Conference last summer during a series of small group meetings. Rep. Walter Jones (R-N.C.) said it was during a four-person meeting in July that Webster really piqued his interest as a viable alternative for speaker.

King and Webster both credited a November speech to the Republican Study Committee as launching the Webster-for-speaker campaign — if only in the minds of a handful of conservatives desperately seeking a viable candidate.

“Republican leaders from Washington and across the country have said that our GOP brand is tarnished and must be fixed. Low public approval of Congress speaks clearly of a flawed process,” Webster told Republicans then. “The only way to improve the GOP brand and make good public policy is to fix the process.”

Webster added: “Republicans now own the Congress and must change the way they lead. Not just a change in packaging and marketing, but a different process — one that is focused on principle, not on power. We only have one opportunity to prove we can lead. Our opportunity is now.”

The so-called broken widgets speech – Webster used the catch-all phrase as a metaphor for problems of the modern day GOP — highlighted the Florida Republican’s “respect for the institution,” King added.

King said he and other conservatives spoke with Webster — often in the halls or during votes — half a dozen times between that November meeting and January about mounting a bid for speaker.

King, though, insisted they made no formal recruitment effort because Webster wasn’t ready to commit to challenging Boehner.

The anti-Boehner crowd lost impetus after the midterm elections gave him the biggest House Republican majority in nearly 80 years, but President Barack Obama’s executive action Nov. 20 to end the threat of deportation for millions of undocumented immigrants gave new life to the opposition. So did the passage in mid-December of the $1.1 trillion “cromnibus” spending bill, which conservatives said didn’t go far enough in challenging the president on his immigration order.

Hard-line conservatives almost brought down a procedural rule to consider the spending measure on the House floor — a move that infuriated leadership — and 67 Republicans voted against final passage.

“When our Constitution is under assault, and House Republicans give away our constitutional power of the purse, they share the guilt of abandoning our founding principle,” said Rep. Jim Bridenstine (R-Okla.) in a statement this week. “Speaker Boehner went too far when he teamed with Obama to advance [the cromnibus]. He relinquished the power of the purse, and with it, he lost my vote.”

With the Congress adjourned for the holidays, the rebels and outside conservatives groups began pushing their message again.

A GOP Conference meeting Monday over the rules package for the new Congress also angered some right-wingers, who felt Boehner and other party leaders didn’t listen to their concerns during that session. Yoho said conservatives “kept talking to each other and other members” throughout the evening looking for more support.

Outside groups allied with the rebels had been pounding Boehner for days. Conservative commentator Sean Hannity — long a Boehner critic — called for his removal. What had been a small group of potentially eight to 10 votes against Boehner started to grow. Boehner sensed the threat and started making calls in a bid to lock down supporters.

Yoho and Rep. Louie Gohmert (R-Texas) had by then declared for speaker, but few inside or outside the Republican Conference took that as much of a threat to Boehner.

However, Webster was vacillating about whether to jump in. By Tuesday morning, Webster knew he would be nominated whether he wanted or not.

Nugent told POLITICO he was leaning toward Boehner for weeks but was discouraged after Monday’s conference meeting. Nugent said Boehner and the leadership team were flippant about the concerns members expressed about the rules package.

Nugent, a former deputy sheriff first elected to the House in 2010, described his vote as “more of an act of frustration. It was a statement to the speaker that I’m disappointed [and to say] ‘Don’t take me for granted.’ I think you hear that from a lot of us, ‘Don’t take us for granted.’”

Nugent also mentioned the inability to get legislation on mental health safeguards to the floor as a key factor for why he, a moderate Republican, joined ranks with the Hell No Caucus — a monicker used to described the rebellious sect of the Republican Party that has made its name by bucking leadership.

Boehner, now genuinely concerned he would lose the vote, began to bring members into his office for personal lobbying, and he was able to change some votes, said leadership aides. A leading conservative Republican, speaking with POLITICO on background, said Boehner had consistently asked members for a chance to govern with a Republican-controlled Senate – and that argument stuck with a number of the usually anti-Boehner crowd.

“Right up until the last minute, I wasn’t sure how I was going to vote,” said Rep. Matt Salmon (R-Ariz.), a conservative who made headlines over the summer when he suggested Boehner wasn’t going to run for a third term as speaker. “It was a really gut-wrenching experience for me. And by the time it got back to me, honestly, [Boehner] had already secured the votes to be speaker, and I’m thinking, ‘Do I want to cast what I thought was a meaningless protest vote, or am I going to try to fix some of the problems from within the tent than without,’ and I decided to vote for him.”

Yet for all the discussions King, Yoho and Gohmert had, the rebellion failed to garner support from the broader group of conservative members needed to overthrow the leadership team. In a statement after the vote, Mulvaney, who voted against Boehner in 2013 but supported him this time, criticized the revolt as “poorly considered and poorly executed.”

“This was an effort driven as much by talk radio as by a thoughtful and principled effort to make a change. It was poorly considered and poorly executed, and I learned first-hand that is no way to fight a battle,” Mulvaney said.

Rep. Marlin Stutzman (R-Ind.) – widely credited as one of the top instigators against Boehner — said conservatives are moving on.