It all came down to one last vote. The finale of "Survivor: Second Chance" was Wednesday, and the unpredictable season was down to six castaways. Would the winner be Jeremy, who shepherded the majority alliance through most of the game? Would it be Kelley, who managed to survive to this point despite a constant spot on the chopping block? Or maybe it would be Spencer or Tasha, Kimmi or Keith? Fans would find out in the three-hour Season 31 finale

Here's how it all went down:

Aftermath 1.0

After episode 13's tribal council, Keith is perplexed as to why the tribe would have voted out Abi.

"I would have much rather taken Abi to the final three than [Spencer]," he argues.

"That's a reason for Spencer to vote out Abi," Spencer replies.

Meanwhile, Kimmi is realizing that she may be on the bottom of her alliance with Jeremy, Tasha and Spencer and wants to change her position in the game. She pulls Kelley aside and raises the idea of blindsiding someone from that trio. Kelley is more than game.

Immunity 1.0

In the first individual immunity challenge of the episode, the castaways must collect a series of puzzle piece planks and use them to complete a staircase on a giant "Survivor" pyramid. Then, they must race up their staircases to complete a slide puzzle. The first person to finish would be safe in the next tribal council. 

Survivor Keith Nale races up a pyramid in an immunity challenge in the finale of "Survivor: Second Chance." Photo: CBS

Spencer takes a big lead to start, but everyone is still in the challenge by the time theu reach the puzzle. Kelley makes quick work of the puzzle to catch up to Spencer, but she falls just short. Spencer goes wire to wire to win individual immunity. 

Tribal Council 1.0

After the immunity challenge, the alleged majority of Jeremy, Spencer, Tasha, and Kimmi make a plan to split their votes between Kelley and Keith, with Jeremy and Spencer voting for Keith and Kimmi and Tasha voting for Kelley. But Kimmi goes behind their backs and makes a plan for the three of them to vote for Jeremy. That means if Jeremy, Spencer and Tasha split their votes, Jeremy would be going home. Spencer, though, does not believe Kimmi and after he leaves instructs Jeremy and Tasha not to split their votes. He wants everybody to write Kelley's name down. Jeremy buys the plan, but cannot decide he wants to play his idol. 

At tribal council, Spencer puts everything out there in the open and declares that Jeremy, Spencer, and Tasha -- purposefully excluding Kimmi -- would all be voting for the same person, hoping to force Kelley and Keith to vote for each other to avoid leaving the elimination up to a tie-breaker. But Kelley has no plans to go home and plays her hidden immunity idol before Jeff reads the votes. Well, Jeremy can't let that go. He plays his idol as well. Everyone stayed true to their original plan and all the votes cast were for Jeremy and Kelley, so for the first time in "Survivor" history, not a single vote counts. 

Jeff announces that there will be a revote. Every castaway will vote, but Jeremy, Kelley, and, of course, Spencer, remain immune. Jeff gives everyone a minute to talk, and Jeremy makes it very clear he wants his trio to vote for the "rat" -- that would be Kimmi. When the second round of votes are tallied, it is another tie between Tasha and Kimmi, with Jeremy, Tasha and Spencer voting for Kimmi and Kimmi, Kelley and Keith voting for Tasha. Jeff asks if anyone wants to change their vote -- no one does. So, now those without votes -- Spencer, Jeremy, Keith, and Kelley must vote for either Tasha or Kimmi. However, if they do not make a definitive decision at this point, Kimmi and Tasha would also become immune and every other player eligible to be voted out would draw rocks to determine who was eliminated -- at that point, that would mean only Keith. At first, Keith volunteers to go home, having a bout of sympathy for Kimmi as a mother. But Kelley later talks him out of that decision and the tribe decides to vote out Kimmi in one of the wildest tribal councils in the history of the show. 

Aftermath 2.0

When the tribe gets back to camp, they are in disbelief about what had just happened. Kelley is also a bit bummed, clearly on the outside looking in at this vital point in the game. 

Immunity 2.0

In the episode's second immunity challenge, the castaways must race around a series of obstacle stations to retrieve bags of pieces for yet another puzzle. The first to finish a puzzle would be safe at the next tribal council. 

Kelley, who needs immunity more than anyone, tackles the toughest obstacles first and is the first player to a puzzle. Halfway through the puzzle, though, Keith catches up. In a head-to-head heat between the game's two most in-desperate-need players, Kelley barely edges Keith to win an all-important individual immunity. 

Tribal Council 2.0 

It seems like the tribe's decision is obvious -- Keith. Kelley and Keith, however, do not plan to sit idly by and let Keith go home easy. Kelley fashions a fake hidden immunity idol for her only ally, and Keith pretends to let Jeremy see him with it by accident. The plan seems to work -- Jeremy is paranoid. He fears he would be the one going home if Keith did have an idol. He discreetly whispers for Keith and Kelley to vote for Spencer. 

Whether or not Jeremy was actually considering voting for Spencer or he just wanted the target off of his own back is unclear, but when the votes are tallied, Jeremy stays true to his alliance and Keith becomes the 16th person out of the game.

Survivor Keith Nale became the 16th person voted out of the game in the finale of "Survivor: Second Chance." Photo: CBS

Immunity 3.0  

In the final immunity challenge of the season, the castaways each must man their own spiraling, metal track. They start by placing a ball into the top and catching it when it comes out of the bottom of the track. If a castaway lets a ball drop they are out, which becomes a tall order when they have to start adding balls one at a time every five minutes. A gate in the track forces the balls to come out on alternating sides, plus, they all have one hand literally tied behind their back -- this is some challenge!

Kelley goes out early and is clearly angry at herself for the slipup, seeing she figures to be on the chopping block next. The challenge eventually comes down to Jeremy and Spencer. Jeremy saves his first win in a first individual immunity challenge for the final challenge. When Spencer drops a ball, Jeremy burst into tears having guaranteed his spot in the final three.

"This is all for Val," he cries, referencing his pregnant wife.

Tribal Council 3.0

Heading into the final tribal council, Jeremy flirts with sending Spencer home instead of Kelley. At tribal council, Spencer could not make his case more clear -- "If you vote for me instead of Kelley, Kelley wins 100 percent, and she will have deserved it." Jeremy agrees. Kelley becomes the 17th person voted out of the game. 

Final Tribal Council

After a final three picnic, Jeremy, Spencer, and Tasha face the jury in the final tribal council. Andrew calls Spencer and Jeremy out for their arrogance in tribal councils; Stephen makes Tasha defend the charge that she just rode Jeremy's coattails and Cierra questions why backstabbing should be rewarded in this season. The jury seems awfully bitter for a group of people that were so self-congratulatory about their own big moves in the game. Meanwhile, Kelly (Wiglesworth) just has the three finalists pick a random number between one and 10 -- a callback to a jury question when Kelly was a finalist in Season 1. 

When Kelley (Wentworth) comes up, the last of the jury members, she asks the three finalists to tell everyone the story of their "second chance." Spencer and Tasha both talk about fostering better personal relationships with people this time around, but Jeremy takes the opportunity to talk about his family. He reiterates that they are the reason he is in Cambodia and finally breaks the news that his wife is pregnant. Jeremy is in tears ... and so is half of the jury. 

Who can beat that case? The answer -- nobody. When Jeff tallies the vote live in Los Angeles, this wild, blindside-filled, voting bloc-dominated season ends with the jury naming Jeremy the winner of "Survivor: Second Chance" in a unanimous vote.