The U.S.' Simone Biles, who has gone undefeated in the all-around since 2013 and has won three consecutive all-around titles at the world championships, became the 2016 Rio Olympic all-around champion after a hard-fought competition.

She ended the night with a huge lead of 2.1 points over the silver medalist, her teammate and close friend Aly Raisman. It's only the second time that two U.S. gymnasts have finished 1-2 in an Olympic all-around, after Nastia Liukin and Shawn Johnson at the 2008 Beijing Olympics.

At the halfway point, however, both Biles and Raisman sat a surprising second behind Russia's Aliya Mustafina.

Mustafina had just pulled out an excellent uneven bars routine to earn 15.666 points, the best bars score of the night. Biles did a routine that would be great by any other standards, but uneven bars is her weakest event so she couldn't quite compare to Mustafina's brilliance.

Biles came roaring back on balance beam while Mustafina faltered. While Biles had nary a wobble, Mustafina botched her planned series of connected tumbling skills and lost a number of difficulty points.

Meanwhile, Raisman quietly and characteristically did some of her best work with a quiet focus. A nearly stuck vault led into a strong bars, then a balance beam routine that earned the night's second-highest score on that event.

Four years ago in London, Raisman tied with Mustafina for the third-highest score in the all-around. The tiebreaker rules stipulated that each gymnast's lowest score would be dropped, and the total of the remaining three would determine the bronze medalist. 

Since Mustafina had fallen on beam but had been excellent on the other three events, while Raisman had been solid on all three events, Mustafina won the tiebreaker and the medal. Raisman got four years' worth of motivation to come back better than before.

Tonight Raisman got her chance on floor exercise, where she was the Olympic champion in 2012. Nailing all four of her tumbling passes, no tiebreaker was needed this time. Raisman's all-around score was 1.433 points ahead of Mustafina's.

The last routine of the night was Biles on floor. She's the three-time world champion on floor, and even has a tumbling skill named after her. Normally close to flawless, Biles found a new level of perfection in that 90 seconds. Joyful and defying gravity, she earned a soaring score of 15.933.

Her final score was 62.198. Raisman earned 60.098, while Mustafina placed third with 58.665. Just barely off the podium was China's Shang Chunsong with 58.549.

Not only was Biles' margin of victory the biggest ever in women's gymnastics, it's larger than the margins of victory from 1980 to 2012 combined. Of course, the current scoring system in place, with an emphasis on difficulty that Biles works to her advantage, has only been in place for three Olympics, including Rio. The older "Perfect 10" scoring system made it much harder for a gymnast to run up a big lead.

Watch the medal ceremony in The Daily Dismount, hosted by Tanith White with Olympians Jonathan Horton and Courtney Kupets Carter, and Samantha Peszek reporting from Rio.