By Joshua Schneyer

RIO DE JANEIRO (Reuters) - Ryan Lochte's last individual event at the Rio de Janeiro Games, and possibly of his Olympics career, did not end the way he wanted to.

Whether it is enough motivation to push his body for a further four years through to the Tokyo Games in 2020 only remains to be seen.

"I can't say this is over. If anything, that race, it helped motivate me," the 32-year-old Lochte told reporters after he finished fifth behind compatriot Michael Phelps in the 200 meters individual medley final.

"There's a lot of things that I need to change in the next four years if I want to come back to the sport."

Lochte's performance at Rio was far from the heights he would have expected, particularly given it was his only individual event at his fourth Olympics.

When he touched the wall on Thursday, it was nearly three seconds behind Phelps.

Having led by 0.01 seconds at half-way, and in third place after the breaststroke, Lochte struggled on the final freestyle lap and finished without an Olympic medal for the first time in the event.

He clinched silver in 2004 and 2012 and bronze in Beijing in 2008. Phelps won gold each time.

He told reporters that his performance on Thursday would be among those he most regretted.

"I had to work at it every day for many years. I just wish I would have ended up better," Lochte said. "I was a little bummed about my performance, but I was happy for him (Phelps) to get the gold.

"We've always pushed each other (and) he's one of the best, not swimmers, but athletes in the Olympics."

Part of confronting that challenge has led to Lochte's success as one of the all-time greats in swimming. He has 12 Olympic medals, six gold, and sits only behind Phelps in terms of being the most successful male swimmer in Olympic history.

He has also won 27 world championships medals in the 50-metre pool and even more in the short course (25m). Had it not been for Phelps, it's likely the native New Yorker would have ended with even more.

"That's the longest continuous competitor I've ever had," Phelps said of the friendly rivalry with Lochte that began in 2004. "And one of the toughest too."

Knowing he was one of the few to push Phelps continuously for his entire career may be something Lochte can smile about when he does eventually call it quits.

For now he just needs a break.

"Who knows, it could be for a day," he said.

"It could be for 10 days, two years. I just know I need physically and mentally to take a break."

(Additional reporting by Mark Trevelyan; Editing by Greg Stutchbury)