Mo Farah won the final track race of his career by the skin of his teeth, clinching a dramatic 5,000 metres win after three chasing rivals collided with each other as they approached the finish line.
The quadruple Olympic champion led down the final straight but Ethiopian world champion Muktar Edris came powering through and appeared set to sneak victory on the line.
However Edris fell to the ground after being clipped from behind by American Paul Chelimo, in turn tripping Ethiopian Yomif Kejelcha on the outside.
Chelimo stumbled over the line in second and Edris's momentum took him over in third.
Farah, beaten by Edris in the World Championship 5,000 metres final two weeks ago, will run marathons from next year.
"It's amazing to come away with a win today," Farah told reporters afterwards.
"I've been resting up and watching Edris, what tactics he normally uses, studying, working out and tonight the game plan was to sit on him and make him do a lot of the work," he added.
"Going into the last lap, the plan was not to give anyone an inch, and that's what I did."
"I will really miss it but everything must come to an end sometime."