Sochi Olympic champion Yuzuru Hanyu came from behind in dramatic fashion to capture his first world championship on Friday night at Saitama Super Arena.

The 19-year-old Hanyu trailed compatriot Tatsuki Machida by nearly seven points following Wednesday's short program, but summoned the energy and endurance to overturn the deficit and cap off an incredible season with a stunning free skate.

Hanyu skated to "Romeo and Juliet" and opened with a quadruple salchow, followed by a quad toe loop, then landed eight triple jumps to run up a huge score. It was the free skate he had hoped for last month in Sochi.

The victory made Hanyu the first man to win both the Olympic and world titles in the same year since Russia's Alexei Yagudin in 2002.

Hanyu also claimed both the Grand Prix Final and Japan national crowns this season.

The Sendai native's spins and step sequences were both excellent and helped make the difference, as he edged Machida for the gold by just .33 of a point. Hanyu's total score was 282.59 points, while Machida tallied 282.26.

Hanyu bested Machida in both executed elements and program components in posting the victory.

Spain's Javier Fernandez took the bronze with 275.93.

Skating in front of another impressive crowd of more than 18,000, Hanyu clinically moved through his routine knowing he could ill afford to make a single mistake. So exhausted was he at the end that he actually went to his knees and put his chest on the ice for several seconds.

"I'm so happy," said Hanyu. "Even though I didn't watch Tatsuki (who went two skaters before him), in my head, I had been thinking that he did a perfect program. That was very close."

Machida competed to "Firebird" and was valiant in earning his first medal ever at a major international competition, while hitting two quads and seven triple jumps. The silver medal capped off a fine season for the 24-year-old, who won two Grand Prix events and finished second behind Hanyu at the Japan nationals.

Machida was fifth in Sochi after struggling in the short program, but gained redemption here in front of the home crowd. The Kanagawa Prefecture native has been under the radar for most of his career, competing in the shadow of skaters like Daisuke Takahashi and now Hanyu.

"I showed everything I have at this moment," stated Machida. "I tried to perform without caring about the score or ranking, but it bothered me a lot and I had a really hard 4½ minutes. I have no regrets about my performance today."

Hanyu, who was the bronze medalist at the 2012 worlds and finished fourth last year, had a lone deduction for taking off on the wrong edge on his triple flip, but received extra credit for highlight distribution on five jumps in the middle of his program.

Despite the triumph, Hanyu remains both ambitious and aware of the expectations he now faces each time he competes.

"I hope that I can become a skater who can always end with strong performances," he said. "I felt the responsibility I have to win this event."

Fernandez was less than two points behind Machida in second place entering the free skate, but was unable to capitalize on the opportunity. He did land three quads, but also botched a triple lutz/double toe loop combo that cost him dearly.

"I popped the triple lutz and didn't do my quad salchow/triple toe loop combination, but still it was a good program," commented Fernandez, who was third at the worlds for the second year in a row.

Russia's Maxim Kovtun took fourth on 247.37.

Takahiko Kozuka performed to "Introduction et Rondo Capriccioso" and placed sixth with 238.02.

Italy's Anna Cappellini and Luca Lanotte hold a narrow lead after the short dance over Canada's Kaitlyn Weaver and Andrew Poje.

The Italian duo notched a score of 69.70, while the Canadians recorded 69.20. France's Nathalie Pechalat and Fabian Bourzat are in third with 68.20.

Cathy and Chris Reed (55.18) are 14th going into Saturday's free dance.

Mao Asada leads heading into the women's free skate on Saturday after setting a new world record in the short program on Thursday.

Italy's Carolina Kostner is in second place, with Russia's Julia Lipnitskaia in third.