LONDON — Kohei Uchimura finally looked like his usual self at the London Games as he won the men’s gymnastics all-around final Wednesday, becoming the first Japanese to claim the gold medal in the event at both the Olympics and the world championships.

The three-time world champion had a landing mistake on the floor exercise, his final apparatus, but kept his rivals at bay with a total of 92.690 points, 1.659 ahead of runner-up Marcel Nguyen of Germany. American Danell Leyva got the bronze with 90.698.

Japan’s Kazuhito Tanaka, a late replacement for an injured teammate, had remained in second place for most of the evening during the 24-man final at North Greenwich Arena but settled for sixth place with 89.407 after missing a floor exercise landing and falling off the pommel horse, his last two routines.

Uchimura, who advanced to the final with the ninth-best score in Saturday’s qualifying, started out with a clean routine on the pommel horse — on which he had a fall in the qualification and wobbled on the landing during Monday’s team final — and took the lead at the halfway point of the six-apparatus event.

After putting his hands down in landing a tumbling series on the floor exercise, the Beijing Olympic silver medalist had to wait for the remaining gymnasts to complete their routines before confirming his victory, claiming the second gold for Japan in London and the first all-around title for a Japanese gymnast since Koji Gushiken at the 1984 Los Angeles Games.

“When I stepped on the podium, I thought this was really a dream,” Uchimura said. “All kinds of things went through my mind, including the thought that I finally made it this far. I think I was able to win the gold medal due to everyone’s support so I really want to thank everybody.”

Uchimura came in as a strong gold medal favorite, but had failed to show top form in the qualification, during which he had falls on the pommel horse and the horizontal bar, as well as in the team final in which Japan garnered the silver medal.

“It was really trying and I wasn’t sure what it would be like today either, but I thought I must perform with a strong feeling for the Japanese team as well as the Japanese people,” he said. “Well, in the end you saw what happened (on the floor exercise) but I’m glad my feeling showed in my routines.”

The 23-year-old also opted to skip a difficult maneuver on the horizontal bar to avoid another fall.

“I fell on the first day (in the qualification) so I talked with the coach because I certainly didn’t want to make a mistake and we thought it would be better to leave it out,” he explained.

Tanaka, who replaced compatriot Koji Yamamuro who had to sit out the all-around final due to a chip fracture on his left foot sustained during the team final, was in second place after the second rotation and held on to the spot even after a slightly botched landing on the floor.

But his hope for a medal evaporated with the fall during his pommel horse routine.

The 27-year-old team captain and the eldest of three gymnast siblings competing at these Games expressed disappointment at the outcome, saying, “As Koji got injured, this was an opportunity for me to show what I can do…and I was able to ride the wave for a while, but I stumbled on the floor and pommel horse.”

The scores from the qualification round are not carried over to the final rounds.