LOS ANGELES — Demetrious Johnson’s all-conquering reign as the Ultimate Fighting Championship’s flyweight champion came crashing to a stunning halt on Saturday night, as Maryvale native Henry Cejudo pulled off a major upset in the co-main event of UFC 227.

Cejudo (13-2), a former Olympic gold-medalist wrestler who was recently inducted to the National Wrestling Hall of Fame, dedicated his fight to Phoenix.

Johnson was the UFC’s first and, until this defeat, only flyweight title holder, having held the accolade ever since the division was implemented in 2012.

He was seeking to extend his UFC-record streak of successful defense to 12 against Cejudo, but the challenger produced a brave, technical and spirited performance to wrest away the crown.

Cejudo was able to land significant strikes and, most importantly, use his wrestling skills to get Johnson to the mat. He dominated most of the last two rounds, which would prove pivotal once the scores came in.

Two of the officials gave Cejudo a 48-47 decision, with a third giving Johnson the nod by the same scoreline.

The clash was a rematch of the pair’s fight at UFC 197, which Johnson won with a first-round knockout. Despite the one-sided nature of that contest, Johnson’s dominance meant he had effectively cleared out the division, and Cejudo was able to fight his way through to gain another chance. He took it.

“I came back to beat the greatest of all-time from being knocked out in the first round,” Cejudo said. “I thought (it was even going into the final round). He may not hit the hardest but man, he is fast, and I came out on top.”

After his triumph, Cejudo laid down an immediate challenge to the winner of the main event, the 135-pound title showdown between T.J. Dillashaw and Cody Garbrandt.

Johnson, who had not been defeated since 2011, vowed to bounce back. “I will regroup from here,” he said.