LONDON — Usain Bolt’s farewell party was spoiled by a pair of Americans.

The Jamaican great finished third in his final 100-meter race, with Justin Gatlin and Christian Coleman taking gold and silver Saturday at the world championships.

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. Coleman took silver in 9.94 seconds while Bolt got bronze in 9.95.

Because of his doping past, Gatlin was booed in London before and after the race.

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.

And Gatlin knew what Bolt meant to the sport, bowing in admiration in front of him, even after beating him.

advertisement | advertise on newsday

Bolt didn’t smile any less afterward.

“It is just one of those things,” Bolt said, showing his carefree demeanor 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.