RIO DE JANEIRO – Helen Maroulis wondered about flying to Iceland instead of Rio two weeks ago. She dreamed last week of eating crepes in Greece.

“I think I’m about to be the biggest failure at the Olympics,” she thought. “I don’t even know if I’m going to make weight.”

Maroulis’ year-long battle with the scale, a struggle she called tougher than wrestling workouts, culminated Thursday evening when she upset the greatest female wrestler of all time and won the first U.S. Olympic women’s wrestling title.

To be fair, Maroulis’ story is about much more than weight cutting.

Her 4-1 win over Japan’s Saori Yoshida is already being compared to the Miracle on the Mat, when Rulon Gardner beat Aleksandr Karelin in the Sydney 2000 Greco-Roman super heavyweight final, after Karelin had won three straight Olympic titles and was undefeated the last 13 years internationally. It’s not quite that stunning, for reasons we’ll get into later.

But start with this. Maroulis, 24, handed Yoshida her first defeat at an Olympics or world championships. Starting in 2002, Yoshida had won 13 world titles and three Olympic gold medals.

Yoshida’s major championship streak is over now. So is Maroulis’ diet. She spent the 48 hours before her five matches Thursday pinning to her fingerlicking good page.

“I’ve been dreaming about all the Greek food,” she said. “If you look at my Pinterest … I’ve probably been to every chocolate or pumpkin or red velvet cake recipe there is.”

The last 11 months since Maroulis won her first world title at 55kg (121 pounds) had been agony. She had to drop down to 53kg (116 pounds) because of a change in Olympic women’s wrestling weight divisions.

Maroulis is used to a walking-around weight of 130 pounds. She hired a nutritionist, who helped her combat a body-fat reading of 23.9 percent.

Chicken. Spinach. Some avocado. Measuring everything out. No dressings. Peanut butter was her treat.

“And I don’t even like peanut butter,” she said.

Maroulis skipped the traditional Christmas dinner.

“With wrestling, it’s two hours a day, four hours a day. … Hard practices, and then I’d be like, OK, I have to make sure I don’t eat anything I’m not supposed to for the next six hours, before I go to sleep,” she said. “And then I have to wake up and do it all over again.”

All this time, Maroulis was working on a game plan to defeat Yoshida.

They had met twice before, at the 2011 and 2012 World Championships. The first time, Yoshida pinned Maroulis in 69 seconds, during which Maroulis suffered a torn UCL in her left elbow.

In 2012, Maroulis lost in the U.S. Olympic Trials final. Though she missed the team, she traveled to London anyway to help train the woman who had beaten her. When she returned, she would face Yoshida again in the world championships, held after the Olympics in Olympic years.

Maroulis was again pinned by Yoshida, but this time it took more than four minutes, and she didn’t tear any ligaments. Improvement.

A fan tweeted at her after that loss, trying to soften the defeat by saying that Yoshida was just plain unbeatable. Maroulis had none of it, telling him she didn’t enter tournaments thinking she would get beat. I will beat her, Maroulis said.

In 2013, Maroulis flew to Japan and trained with Yoshida and others. Japan is the world power in women’s wrestling. Japanese women won four of the six gold medals in Rio this week.

“I don’t think I ever got a takedown on anybody at that camp,” Maroulis said.

In February 2014, Maroulis met Valentin Kalika, a coach originally from the Soviet Union. They developed a game plan for Yoshida, but one that would also work against other elite international wrestlers.

Maroulis pored over film of Yoshida’s matches, translated her interviews and even her TV commercials. Yoshida is a megawatt celebrity.

“I wanted to see how she thought. I wanted to see how she strategized,” Maroulis said. “I’ve never seen her cocky. Three gold medals, and she’s so humble and so nice. … I stopped viewing her as an enemy.”

The world started viewing Yoshida as beatable. In 2015, Yoshida edged Swedish rival Sofia Mattsson 2-1 in the world championships final, after winning 6-0 in their matchup the year before.

Maroulis wrote in her journal afterward:

“I watched the finals match between Yoshida and Mattsson. I believe I can beat both of them, but I have a lot of work to do.”

Still, Maroulis acknowledged going into the Olympics that facing Yoshida appeared to be a David-versus-Goliath battle.

But it became evident in Thursday’s semifinal that she had a real chance to take down Yoshida in their final. That’s because in the semis Maroulis pinned Mattsson, the Swede who had closed the gap on Yoshida the previous year.

Mattsson later said she was not surprised that Maroulis dethroned Yoshida.

“I felt like she would have a good chance,” she said.

Yoshida’s speed and quickness were key as she dominated for some 15 years, but now, at 33, experts said she had lost a step.

She dealt with a reported knee injury before the Olympics and said it would be her final competition.  Yoshida went back on any retirement plans Thursday night, saying she had not decided on Tokyo 2020.

“She’s at the highest level of maintenance,” Tim Foley, the senior media manager for United World Wrestling, said three weeks ago. “She’s not working out to get stronger like a 22-year-old. She’s working out to maintain what she has.”

Whereas Karelin, who had not been scored on in the six years leading up to the 2000 Games, was still in top form when he was dealt a shocking upset, Yoshida was showing signs of vulnerability. And meanwhile, Maroulis had already begun to establish herself as her heir apparent after last year’s world title.

When Yoshida and Maroulis went head to head, Yoshida felt something different than their previous two matches and the 2013 training camp.

“The opponent is stronger than me,” Yoshida said later in Japanese. “I should have attacked sooner and faster, but the opponent was stronger than me.”

When the match ended, Maroulis and Yoshida fell to the mat. Both shed tears.

The phalanx of photographers followed Yoshida, who was still distraught 20 minutes later receiving her silver medal and 40 minutes later doing interviews in the mixed zone.

Yoshida said she wanted “to apologize, just to express my regret that I ended up just getting silver.”

Maroulis eventually received an American flag, made a victory lap on Mat B and jumped into the crowd.

“I kind of forgot that I was wrestling for a gold medal,” Maroulis said. “I was dreaming about this match so much that I was just wrestling her. Then when I was done, I was like, I get a gold medal now! Oh, cool.”

Maroulis was then asked what her first celebratory meal would be.

“A buffet,” she said.

Join our Newsletter for the latest news right to your inbox