Kristin Armstrong made it three consecutive women's Olympic time trial titles ©Getty Images

American Kristin Armstrong made it three consecutive women's Olympic time trial titles a day before her 43rd birthday - as Swiss rider Fabian Cancellara produced a masterclass to take the men's title in Rio.

Armstrong, the Beijing 2008 and London 2012 champion, powered to another gold medal with a time of 44min 26.42 to make it a historic hat-trick.

The veteran rolled back the years in tricky conditions for time trialing, with rain and wind making the course hazardous.

Her victory pushed Russia's Olga Zabelinskaya, who clocked 44:31.97, into the silver medal position while Dutch rider Anna van der Breggen, already the Rio road race champion, added another medal with bronze in 44:37.80.

Zabelinskaya, who accepted an 18-month suspension for a failed drugs test for octopamine in February, would have been an unpopular winner.

The Russian would have been barred completely had the International Olympic Committee's ruling to ban all from the scandal-hit country who had served doping bans not been overturned at the Court of Arbitration for Sport.

"I don't have words to describe it," said Armstrong, who had Mara Abbott, her compatriot who lost a late lead to finish fourth in the road race, in her thoughts.

"When you've already been two times at the pinnacle of the sport, why risk coming back for the gold medal? 

"The best answer I can give is that I can. 

"Today the stars aligned. 

"I knew it was going to be a close race. 

"My coach said to me, 'okay, you decide what colour medal you want to have'.

"I dug so deep. 

Fabian Cancellara retained the title he won at Beijing 2008 ©Getty Images
Fabian Cancellara retained the title he won at Beijing 2008 ©Getty Images

"I thought about Mara and I gave everything for her in the final five kilometres. 

"To hear the national anthem on the podium, that's my favourite part of the Olympics."

Thirty-five-year-old Cancellara will retire at the end of this season and said farewell to the Olympic stage with a gold medal, after triumphing at Beijing 2008.

He was timed at 1:12:15.42 after a storming middle section of the course.

Dutchman Tom Dumoulin and Britain's Tour de France champion Chris Froome had been the favourites but had to settle for silver and bronze respectively, in 1:13:02.83 and 1:13:17.54.

"This was the last time for me to try to win an Olympic medal," said Cancellara, who crashed out of the London 2012 time trial won by Bradley Wiggins.

"It means so much to me. 

"After missing out on gold in London and all the ups and downs I've had since then, this is just amazing to win the gold today. 

"Against this field, and on such a hard course, we had doubts, but good doubts. 

"There are just no words. 

"To leave the sport at the end of this season with the gold medal is just a perfect way to end my career. 

"It was a big scream on the podium. 

"This was the last big time trial of my life."