Tony Martin ended his career in style on Wednesday after helping Germany to win the mixed relay time-trial title at cycling's world championships in Flanders.

Martin, Max Walscheid and Nikias Arndt were second fastest in the men's section before Lisa Brennauer, Lisa Klein and Mieke Kroeger did even better to claim the gold medal with all six riders pulling on the world champion rainbow jersey.

Germany beat the Netherlands by 12 seconds while Italy squeezed into third, just five seconds ahead of Switzerland.

The Italians posted the fastest time in the opening 22.5km loop in a relay race where three men race first and release the three-strong women's team when they cross the finish line.

"It's thanks to the girls, they made the difference," Martin said after winning the event which was inaugurated in 2019 and which has a powerful feelgood factor to it.

"I'll be honest, we were targetting the win, hoping for the gold medal. Now we'll celebrate this win and I'll be off for holidays with my family," he said. "The decision to retire is quite fresh, so we’ll see what I'll do after that."

"It's the best way to finish, isn't it? Going from the cycling scene with the gold medal is a dream for me, the best situation I can imagine," Martin said.

Female rider Klein, who threw herself to the ground in exhaustion at the finish line in Bruges, said closing out the win had been agony.

"It means a lot and it was a super painful race and I think we all went over our limits," she said.

"It's so great to be part of this team. There's a super good atmosphere. And congratulations on Tony’s last race so it was a big honour for all of us to fight with him for the win today."

Jumbo-Visma rider Martin sparked a mass crash at the Tour de France in June when he collided with a fan holding up a sign on the first stage.

The 36-year-old, who won four world titles in the individual time trial, in 2011, 2012, 2013 and 2016, announced Sunday that he would be retiring after the championships.