Olympic roommates Michael Phelps and Ryan Lochte maintain a relaxed vibe at the athletes' village. There's an ongoing card game in their suite and they amuse themselves with endless Snapchat sessions.

It'll be all business on Thursday night.

They'll race against each other for the final time in the 200-meter individual medley, ending a 13-year rivalry that has been one of the greatest in swimming history. The Americans are the top two all-time performers in the event.

Phelps and Lochte have each medaled in the 200 IM in the last three Olympics. Phelps won each time and Lochte finished second, third and second.

"The history him and I have had with one another, it's something special and something I've never had in another competitor of mine," Phelps said. "We'll have one more time to hop in the pool and duke it out."

Phelps is finally retiring after these games, where he has already won his 20th and 21st gold medals. He'll try to become the first swimmer, male or female, to win the same event in four straight Olympics.

Lochte has owned the 200 IM world record for seven years, but Phelps usually comes out on top against him. That's how it went four years ago in London, when Phelps won and Lochte finished second. Lochte beat Phelps in the 400 IM on the first day of swimming in London, his most notable victory on a big stage in their rivalry.

"It's going to take a perfect performance in order to beat him just because of how tough a competitor he is," Lochte said. "He won't give up and that's awesome. That's why he brings out the best in me and hopefully I do the exact same for him."

Lochte turned 32 last week and is non-committal about whether Rio is his last Olympics. The clock is ticking down on Phelps, who races five more times before hanging up his suit at age 31. He plans to marry his fiancé after the games and focus on life with their infant son.

Regardless of the outcome, the atmosphere back in their room at the Olympic Village will stay chill.

"We'll hang out because swimming doesn't dictate our friendship," Lochte said.

The Brazilians have a stake in the 200 IM, too. Thiago Pereira could deliver the host country's first swimming medal of the games. Since 1988, Greece has been the only host country not to win a swimming medal -- in 2004. Keep an eye on Japan's Kosuke Hagino, who also has a shot to make the podium.

Before Phelps and Lochte go at it in the pool, Katie Ledecky swims the preliminaries of the 800 freestyle, her last individual event in Rio.

The 19-year-old American is the heavy favorite to win the grueling race, which would give her a sweep of the 200, 400 and 800 freestyles for the first time since Debbie Meyers of the U.S. in 1968.

"The week has gone good so far, and I think I'll be able to top it off well in the 800," she said.

Ledecky seeks her fourth gold medal in Rio, which would tie her with Amy Van Dyken (1996) and Missy Franklin (2012) as the only American female athletes to win that many in a single Olympics.

On the sixth night of swimming in Rio de Janeiro, the Campbell sisters seek the same golden prize in the women's 100 freestyle.

Cate Campbell posted the fastest time in the semifinals, an Olympic-record 52.71 seconds and younger sister Bronte was fifth-fastest at 53.29. Bronte is the reigning world champion, but Cate is the world-record holder.

"I am really looking forward to it, I can't wait," Bronte said.

The sisters already have teamed up to lead Australia to a gold medal in the 4x100 freestyle relay.

Meanwhile, Ranomi Kromowidjojo of the Netherlands will try to defend her sprint title. And Russia goes for its first gold medal in the pool in the men's 200 backstroke. Evgeny Rylov was the leading qualifier in 1 minute, 54.45 seconds. World champion Mitch Larkin, and Americans Jacob Pebley and 100 back winner Ryan Murphy will vie for medals.