AP Photo/Charles Krupa

Venus Williams' Rio Olympics is still going — just barely.

Upset in the first round in singles and doubles, the four-time gold medalist faced two match points Thursday in her opening mixed doubles match with U.S. teammate Rajeev Ram.

They saved both — one on a reflex volley by Ram that went for a winner — in rallying from a set down for a 6-7 (4), 7-6 (3), 10-8 tiebreak win over Kiki Bertens and Jean-Julien Rojer of the Netherlands.

Williams wasn't originally expected to play mixed doubles in Rio de Janeiro but was entered in the draw after her two early exits, which came while she was battling a virus. The 36-year-old was still coughing Thursday but didn't want to talk about her health.

Ram's match-saving volley was something she could smile about.

"Sometimes you’re there for a reason," said Ram, a 32-year-old coming off a semifinal appearance at Wimbledon in men's doubles. "We kind of felt like after that we were supposed to be on that court."

It had been a rough Rio Games for the Williams sisters, whose passion for the Olympics is matched only by their success there.

"Definitely not ideal, but we’ve had amazing Olympics," Venus said of the sisters' careers, in which each has won four golds.

On Saturday, Venus lost in the first round in singles.

AP Photo/Charles Krupa

On Sunday, the Williams sisters lost together for the first time in Olympic doubles.

AP Photo/Charles Krupa

On Tuesday, Serena was stunned in the third round.

AP Photo/Charles Krupa

"What can you do except come back and play again?" Venus said.

In fact, Serena plans to quickly return to the court as well, making a late decision to play in Cincinnati next week before the U.S. Open to help keep her No. 1 ranking.