LOS ANGELES (AP) — Henry Cejudo pulled off one of the most impressive upsets in mixed martial arts history at UFC 227.

T.J. Dillashaw simply repeated himself, only quicker.

Cejudo ended Demetrious Johnson’s nearly six-year reign as the UFC flyweight champion Saturday night at Staples Center, earning a split-decision victory over the most dominant active champion in the sport.

In the main event moments later, Dillashaw defended his bantamweight title with a vicious first-round stoppage of former champ Cody Garbrandt, beating his friend-turned-rival for the second time in nine months.

Cejudo (13-2) is an Olympic gold medal-winning wrestler who only started training in mixed martial arts five years ago, but he used five takedowns and relentless offense to earn the decision over the fighter widely considered the pound-for-pound best in MMA. Cejudo won 28-27 on two of the three judges’ scorecards to beat Johnson (27-3-1), who had won 13 consecutive fights since 2012 and had defended his 125-pound belt a UFC-record 11 straight times.

“This is a dream come true, from Olympic gold medalist to UFC champion,” Cejudo said. “I was born right here in Los Angeles, in a two-bedroom apartment. So from the bottom of my heart, thank you to these fans in California for their support.”

In the main event moments later, Dillashaw (17-3) exchanged furious strikes with Garbrandt (11-2) from the opening minute. Dillashaw finished it by stunning Garbrandt with a series of blows, dropping the challenger and then battering him against the cage until referee Herb Dean stopped it with 50 seconds left in the round.

Dillashaw and Garbrandt trained together in Sacramento until 2014, when Dillashaw left in a messy breakup with the Team Alpha Male gym. The fighters met for the first time last November, and Dillashaw stopped Garbrandt in the second round to take the bantamweight belt.

The rematch was just as violent, but even more decisive.

“This cements my legacy as the greatest bantamweight of all time,” Dillashaw said. “I could tell that Cody was already hurt when we started that exchange, and then I lined up the shot. I got a little excited when I should have slowed down and finished him, but I got the job done.”

Dillashaw held the 135-pound title belt for nearly two years before losing it to Dominick Cruz on a debatable split decision in early 2016. Garbrandt then took the belt from Cruz in December 2016, less than two years after he entered the UFC.

After Cejudo’s victory, the new 125-pound champ called for a superfight with the winner of the 135-pound main event. When Dillashaw was told of Cejudo’s challenge, he replied: “Henry Cejudo! Let’s go, baby!”

Johnson, who didn’t appear to be upset with the judges’ call, was the only flyweight champion in UFC history. Although successful in striking, Johnson didn’t have his usual resourceful performance in his return from a career-long layoff of 10 months. Johnson knocked out Cejudo in the first round of their first meeting in 2016, but Cejudo showed off everything he had learned in the interim.

Cejudo was born in Los Angeles, and he won an Olympic gold medal in freestyle wrestling as a 21-year-old phenomenon in 2008, becoming the youngest American to win a gold medal. He only started training in mixed martial arts in January 2013 — four months after Johnson first won his UFC belt.

Cejudo won his first 10 pro fights to earn his first shot at Johnson, but Mighty Mouse stopped him with a flurry of punches in the first round of their first meeting 28 months ago. Cejudo earned a rematch thanks to two straight rebound victories and the utter lack of more compelling contenders for Johnson, who had been content to stay at flyweight instead of chasing bigger-money bouts at bantamweight, where he fought earlier in his career.

Right before the title bouts on the top-heavy show, Brazilian featherweight Renato Moicano (13-1-1) finished Palm Springs veteran Cub Swanson (25-9) in the first round with a rear naked choke.

The show was the UFC’s first in three years in downtown Los Angeles, and the first since local entertainment conglomerate Endeavor bought the promotion for $4 billion in 2016. The luminaries at cageside included Matt Damon, Chris Pratt, Miles Teller, Mickey Rourke and Zlatan Ibrahimovic.