LONDON — The loudest roar of these world track and field championships came on Saturday night as Usain Bolt lay facedown on the track and in great pain.

The roar had nothing to do with Bolt: It was about a surprise British victory.

After Bolt took the baton from his teammate Yohan Blake to run the anchor leg of Jamaica’s 4x100-meter men’s relay, their team was in third place. In years past, that would have been a minor obstacle for Bolt, the greatest sprinter in history. This time, he began to gather speed, only to pull up and shout in pain from what appeared to be a left leg injury about 60 meters from the finish line.

It was hardly the farewell party that Bolt had in mind when he decided to make this meet the final one of his career.

His failure to finish would normally have cast a pall over the rest of the race, but it has been a frustrating meet for Britain, the host country. And with Bolt on the ground and the Jamaicans out of contention, the gold came down to a sprint for the finish between Christian Coleman of the United States and Nethaneel Mitchell-Blake of Britain.