Martina Hingis has retired twice and been hit with a doping suspension since she last played the Olympics in 1996 as a precocious 15-year-old.

But after waiting 20 years to return to the Games, the Swiss star almost had her Rio dream snatched away -- not once but twice.

First, Roger Federer, her scheduled partner in the mixed doubles, withdrew with injury and a day later Belinda Bencic, her doubles teammate, also pulled out.

In a last-minute solution, where Vitorija Golubic dropped out of the team, Hingis was paired with Timea Bacsinszky.

"When Roger agreed to play with me I was very excited but in our sport you never know what's going to happen next week," said Hingis who only arrived in Rio on Thursday afternoon.

"Of course, when the phone call came I was little prepared as it's never easy to say no to something you have looked forward to.

"But we were both equally disappointed that we couldn't compete in the Olympic Games together. I was looking forward to bringing home a medal.

"I have another chance. I never go on the court thinking I am going to lose and I am here to compete hard with Timea," added Hingis, now a 35-year-old veteran of the tour.

Back in the 1996 Olympics, Hingis lost in the second round of the singles and reached the quarter-finals of the doubles with Patty Schnyder.

She went onto establish herself as the leading player of her generation, winning five Grand Slam singles titles between 1997 and 1999.

But she retired in 2003 with a knee injury before returning to the tour in 2006.

One year later, she was into her second retirement when she was hit with a two-year doping suspension having tested positive for cocaine at Wimbledon.

Six years later she was back again, reinvented as a doubles specialist and has since won three Grand Slam titles, forming an imposing partnership with India's Sania Mirza.

"I was very much a rookie on the tour," said Hingis as she looked back on her time in Atlanta.

"Now it's not as stressful. It's the experience that counts for me. I feel like a junior again. I was 15 then, now I am 35 and a lot of things have changed.

"Playing in the Olympics was a priority for me when I came back to play Fed Cup two years ago. Now I am here with Timea and I will try my best."

The only problem for the Swiss pair is that they have never played together as a doubles team.

However, that has not affected their seeding.

"We are seeded five so that shows confidence in us. We haven't played together, but we'll figure out a way to communicate," added Hingis.