Four-time Olympic champion Mo Farah has won the final track race of his illustrious career, clinching a dramatic 5,000 metres win after three other runners collided with each other as they approached the finish line. 

Britain's Farah led down the final straight at the Diamond League final on Thursday in Zurich, Switzerland, but world champion Muktar Edris came powering through and appeared set to sneak a victory on the line. 

Edris fell to the ground after being clipped from behind by Paul Chelimo. In turn, Edris tripped Yomif Kejelcha on the outside. Chelimo stumbled over the line in second, and Edris's momentum took him over in third.

Farah finished in 13 minutes and 6.05 seconds, 0.04 seconds ahead of Chelimo. 

Farah said he will run road races from next year [Robert Hradil/Getty Images]

The Somali-born 34-year-old had clinched 10 consecutive global titles before Edris ended his streak at the World Championships earlier this month. 

Farah will now turn his attention to marathons. 

When announcing his decision to leave the track, Farah said that "everything must come to an end at some point". 

"I'm a little bit sad, but at the same time I think I have some unfinished business on the road."

Farah won the gold medal in both the 5,000m and 10,000m at the London 2012 Olympics, a feat he repeated four years later in the Rio Games.  

Many online congratulated the track star, calling him a "legend" and wished him well as he sets his sights on road races. 

Source: Al Jazeera and news agencies