RIO DE JANEIRO -- Former Episcopal multi-sport star Meghan O'Leary advanced to the medal round in double sculls rowing at the Summer Olympics in dramatic fashion.

The United States team of O'Leary and Ellen Tomek was in fifth place with less than 1,000 meters to go and edged reigning world champion New Zealand for third place by five one-hundreths of a second.

As the boats crossed the finish line, New Zealand was initially listed as placing third. O'Leary and Tomek didn't know they had taken third until the final results flashed on the scoreboard a few seconds later.

"It was incredible. We crossed the line and from there we can see a big screen where they flash the finishing order," O'Leary said. "They posted first and second for Greece and Lithuania and there was a long delay before the third place slot flashed up. As soon as I saw USA, I just yelled and threw a fist pump. We've had several close races before, but this was definitely the tightest.

"In a race like that, and to knock off the reigning world champions, it took a lot of heart but we definitely had a little luck and things fell our way. I'm just so proud of the effort Ellen and I put into the race today. It's what the Olympics are about. Never give up."

The third-place at LAGOA Stadium secured one of six final slots for O'Leary and Tomek. The medal race is set for 8:04 a.m. Thursday.

Greece won the heat in 6 minutes, 51.99 seconds. O'Leary also splashed the water with both hands to celebrate. The O'Leary-Tomek team had covered the 2,000-meter distance in 6:52.92, just ahead of New Zealand at 6:52.97. Lithuania was second in 6:52.46.

O'Leary said the dramatic finish was not planned.

"We knew we had to get off the line and actually hadn't planned to have to come from behind like that," O'Leary said. "A race can play out in so many ways and the best crews know how to respond in any situation. We stayed calm and just never gave up. For the final, we'll have to put it all together and have a little bit of a faster first half to get it done."

The U.S. team enters the final with a No. 5 qualifying time. Poland won the second heat, posting the top qualifying time of 6:50.63. The top five teams are separated by less than two and a half seconds, based on qualifying times.

In addition to Poland, Greece and Lithuania, Great Britain and France also advanced.