STILL THE BEST: Michael Phelps (right) and Ryan Lochte look on after the 200-meter individual medley yesterday in which Phelps avenged an earlier loss to Lochte and won his 20th career medal. Photo: Getty Images

Michael Phelps isn’t the supernova he was in Beijing in 2008 or in Athens in 2004, but he is still the best swimmer in the world, says The Post’s Mike Vaccaro. (Reuters)

LONDON — By the time they reached the wall for the final turn, breaststroke changing into freestyle, the lead was just a tick under a second, and there was no way Ryan Lochte was ever going to make that up. Not in this race. Not in this pool. Not if they’d switched the venue to the Thames, or the Channel, or the Atlantic.

Not with Michael Phelps smelling gold. Even under water.

“He’s one of the best swimmers of all time,” Lochte said later, a valedictory that served as both tribute and explanation. Lochte had fired the first shot across the bow of these Olympics, thrashing Phelps on the Games’ first night in the 400-meter individual medley, suggesting a torch of sorts might have been passed inside the London Aquatics Centre.

But Lochte discovered something in the days that followed, and last night, as he could sense Phelps wiggling away from him, all the way toward a resounding win in the 200-meter individual medley, the point was emphasized.

It’s far easier to take a shot at the king than to wear the crown yourself.

“This rivalry has been good for both of us, it’s pushed us,” Lochte said. “It’s something I’ll cherish the rest of my life.”

Phelps isn’t the supernova he was in Beijing in 2008 or in Athens in 2004, but he is still the best swimmer in the world. Paul McCartney might not have had the same career after he left the Beatles; he still had nine No. 1 hits in the U.S. and four in the U.K. as a solo act. “Silly Love Songs” might not be “Let it Be,” but a hit’s a hit.

Two golds — with a chance for two others — might not be eight, but winning races is still something Phelps knows, and knows well, deep in the fibers of his muscle memory. Even now, at a time in Phelps’ career when he can finish out of the money in the 400 IM and get beaten to the wall in the 200 butterfly, he still knows how to finish, and he still knows how to take a moment by the lapels.

“It was pretty cool,” Phelps said.

It was his 20th Olympic medal, his 16th gold. Every time he climbs a medal stand he nudges an impossible record even further out of reach, as if DiMaggio could have magically added games 57, 58 and 59 sometime later. Phelps insists he is done with the sport the moment he concludes his race program tomorrow.

“And there won’t be any Masters level for me,” he said, laughing, “so don’t ask.”

The funny thing is we may appreciate who Phelps is and what he has been much more now that he’s closer to the world than we ever did when he occupied his own swimming area code. Other swimmers have long marveled — the jealous ones snickering — that Phelps can create such ambitious programs for himself at events like this one.

But it’s one thing to enter eight races.

It’s something else to win eight races.

We are seeing that with Lochte, whose Olympics are over now that he begged off a leg of the medley relay race, but who said he fully intends to be in Rio de Janeiro in 2016. Lochte felt the need to describe his Olympics as “up and down” in a tweet last night despite the fact he took home five medals, two of them gold.

We are even seeing it with swimmer Missy Franklin, who was the darling of these Games until gymnast Gabby Douglas unseated her. Franklin, who has finished out of the money in her two individual finals since striking gold in the 100 backstroke, actually flirted with last place in the 100 freestyle finals last night before settling for fifth.

Lochte and Franklin have had a fabulous meet. And in Rio, they will almost certainly be favored to medal in whichever events they choose. Maybe by then, with Phelps out of the water, the standard of excellence will return to what it used to be, and there will be no need for tweets all but apologizing for silver medals.

Maybe then, we will truly be able to marvel at what Phelps’ standard of excellence really was.