Michael Phelps and Ryan Lochte celebrated Nathan Adrian’s narrow win together (PHOTOS)

Minutes before they swam next to one another in a 200 IM semifinal and 24 hours before they'll meet for the final time in their illustrious rivalry, Michael Phelps and Ryan Lochte celebrated together when their United States swimming teammate, Nathan Adrian, narrowly won the 100 freestyle.

Phelps and Lochte were in the ready room preparing for their semifinal while Adrian swam. They stood and watched together as their 4x100 freestyle teammate stormed from behind in the final meters to defeat defending world champion James Magnussen by .01 seconds.

When Adrian got in ahead of Magnussen and the "1" flashed by his name, the rivals yelled at the same time: Lochte uttered a "whoo," while the 15-time gold medalist yelled "come on!" Phelps then made the same pose in 2008 after Jason Lezak made a similar comeback against Alain Bernard in that famous 4x100 relay. You may remember it from the 500 times NBC has showed it this week.

Phelps and Lochte were genuinely excited -- no fake gymnastics happiness here -- and executed an impressive no-look bro-clasp to celebrate.

A few minutes later, Lochte defeated Phelps in the IM semifinal. They will race Wednesday at 3:19 p.m. ET for the gold medal.

Related Olympics coverage on Yahoo! Sports:

More Olympics coverage on Yahoo! Sports:

Where does Phelps rank all-time among Olympians?
Taekwondo fighter funds Olympic quest in unique fashion
Schmitt lights up Team USA swimming with smile, success