Gervonta Davis lost his belt by missing weight even before fighting Saturday and his inattention in the ring also led to a more difficult bout than he believed.

Referee Russell Mora controversially awarded Davis an eighth-round knockout victory on a left-handed punch that struck opponent Francisco Fonseca in the back of the head.

Davis (19-0, 18 knockouts) said he hurt Fonseca with a body blow before the punch, and explained that the disputed shot “capped” the damage, although fans who watched replays in the arena booed that thought.

“Everyone saw I was going down from a blow that was not legal,” Fonseca said. “I want a rematch. … Even though he came in at 160 pounds, he didn’t hit as hard as he says he does.”

Davis lost the belt by weighing 132 pounds, two over the junior-lightweight limit Friday, losing his belt and putting the International Boxing Federation title on the line only for the 40/1 underdog Fonseca.

Fonseca (19-1-1) rocked Davis so hard with a punch in the seventh, the former champion was forced to grab the ropes to remain standing.

Davis immediately swinging aggressive uppercuts to open the bout, trying to end the fight impressively, but he was locked in a tougher test than he thought.

Costa Rica’s Fonseca landed a head-jarring punch that forced some flush blows in the third.

Davis responded with a power punch in the fourth and began some showmanship before Fonseca smacked him with a few clean shots.

In the fifth, Davis began showing more seriousness, backing Fonseca with a left, and he landed a hurtful left to the gut in the sixth.

The bout served as the co-main event to the Floyd Mayweather Jr.-Conor McGregor boxing event matching the 49-0, five-division boxing champion against the charismatic UFC champion McGregor, which was not complete at press time.

Davis, after working out under Mayweather’s guidance and training feverishly in a rubber suit Thursday night, revealed again the difficulty some boxers have in making weight.

He apologized on Twitter afterward, posting: “I’m young. I’m growing. I had a chance to make the weight. I knew I couldn’t make it and that’s that. I will have a belt again.

“I lost the belt, not a fight. … I will make it up.”

That left Davis’ stablemate at Mayweather Boxing Club, former super-middleweight champion Badou Jack, to fight for a belt. He succeeded, stopping Nathan Cleverly by fifth-round technical knockout.