At the end of a career in which he has dominated his sport for a decade, Bolt was beaten in his final 100-meter race by an American almost five years his senior — Justin Gatlin.

Calling it quits at the age of 30 and looking for a golden farewell in his last individual race at the world championships, Bolt lost to a man who produced a comeback not only on Saturday but also through a doping-tainted career.

In a tight finish, Bolt was punished for his slow start and Gatlin fought back to nip everyone at the line in 9.92 seconds. Christian Coleman took silver in 9.94 seconds while Bolt got bronze in 9.95.

“My start is killing me,” Bolt said. “Normally it gets better during the rounds but it didn’t come together.”

Gatlin knows what Bolt has meant to the sport, graciously bowing in admiration in front of him — even after beating him. The two men, never really friends, warmly embraced and spoke.

“It’s just so surreal right now,” Gatlin said. “Usain has accomplished so much in our sport and inspired others.”

When his victory sank in, Gatlin let out an almighty roar and then put a finger in front of his mouth for silence as the crowd continued to show him disrespect.

It was an amazing turnaround for Gatlin, who was the Olympic champion in 2004 before Bolt emerged and won an unprecedented three straight 100-meter titles at the Olympics. Thirteen years later, Gatlin bounced back to win in the Jamaican’s last individual race.

In between, Gatlin’s career was stopped twice for doping suspensions. Yet fighting controversy all the way since, he got perhaps his greatest gold at 35.

“It was almost like 2004 all over again,” Gatlin said. “I won by a little margin, and to be able to come across the line is amazing.”

The 60,000-sellout crowd at the Olympic Stadium, ready for a party in a race they were convinced Bolt would win, had to acknowledge a champion they relentlessly booed over the opening two days of the championships.

It turned into awkward scenes with the champion being overlooked for the bronze medallist .

“It’s not about the crowd,” Gatlin said. “I tuned it out through the rounds and stayed the course.”

Bolt didn’t smile any less afterward.

“It is just one of those things,” Bolt said, showing his carefree demeanour even in defeat. “It has been brilliant.”

Bolt was again slow out of the blocks in the final and came back strong, but he ended up short. When he ran out of steam, Gatlin gathered more.

“He knows how hard I work,” Gatlin said. “Tonight was all about the W (win) and I managed to sneak it.”