After all the hard work that swimmers put in to get to the Olympics, pretty much the worst way to go out is by disqualification.

That sinking feeling crept into the stomach of Spanish swimmer Miguel Duran Navia during his preliminary heat in the 400m freestyle Saturday at the 2016 Rio Olympics.

Navia leaped into the water just before the gun -- an automatic disqualification. Olympic dreams dashed.

Or not.

According to the AP, Navia cried as he packed up his things and walked off the platform. But just moments later he returned and was allowed to compete in the event.

Navia explained to officials that he had heard a sound in the stands which caused him to jump into the water early, and was granted a reprieve.

Miguel Duran Navia had a rough time on Saturday. Getty Images

Unfortunately Navia, possibly flustered from the situation, finished seventh in a time five seconds off his personal best. He failed to qualify for the final.

"I was very nervous, my mind wasn't where it was supposed to be," he said.

At least he can rest assured that he lost the event in the pool, and not on a technicality. Navia has another chance to medal in the 4x200m freestyle relay later this week.