British sprinter Mark Cavendish withdrew from the Tour de France on Tuesday to focus on his bid for a first Olympic medal at the Rio Games in just over two weeks.

The 31-year-old won four stages this year and now has 30 in the bag overall, meaning the “Manx Missile” is creeping up on Belgian legend Eddy Merckx and the all-time record of 34 stage wins.

There are five stages left in the race this year, four of which are in the Alps, but Cavendish will not now be starting stage 17 on Wednesday.

“After an extremely enjoyable and successful couple of weeks at the Tour de France with Team Dimension Data, it is with great sadness that I took the decision today to leave the race,” Cavendish said in a statement.

“After the heat and intensity of the previous stages, we analysed my fatigue levels and decided I’m at a point that would have a detrimental effect on my other big goal for the year, the Olympic Games.

“To leave a race and organisation that I hold so much respect for and a team that I have such a special bond with has not been an easy decision at all.”

Douglas Ryder, the team principal, paid tribute to Cavendish and said he respected his decision.

“He managed to put on his first ever yellow jersey and to carry the green jersey into the first rest day in Andorra was just exceptional,” he said.

“He has been a great team leader over the past two weeks and a great ambassador for everyone involved in this team and for the greater cause we ride for.

“Mark is really sad to leave the tour, we are committed to support him in his dream goal of receiving a medal for Britain at the Rio Olympic Games.”

Australian Rohan Dennis similarly quit the Tour on Tuesday’s rest day to concentrate on his Olympic preparations.

Dennis, 26, who won the opening stage time trial at the Tour last year and wore the race leader’s yellow jersey for a day, was sitting 126th overall at more than two and a half hours behind leader Chris Froome.