RIO DE JANEIRO (AP) — Italian Daniele Garozzo stunned top-ranked American Alexander Massialas to win the gold medal Sunday in men's foil fencing.

Garozzo beat Massialas — who was seeking to become the first American man to win at the Olympics in the modern version of the sport — 15-11 to give Italy its second gold of the Rio Games.

Massialas rallied from six points down in the quarterfinals. But he gave up six straight points to Garozzo in the final as the Italian ran away with the match.

Still, Massialas is the first individual Olympic medalist the U.S. has produced in men's fencing since Peter Westbrook won a bronze in 1984.

Russia's Timur Safin took bronze.

Few seemed as shocked to see the 11th-ranked Garozzo topple the American more than the fencer himself. Garozzo ditched his mask and ran the length of the piste to salute a Brazilian crowd that had decided to back the underdog.

Officials forced a jubilant Garozzo back to the strip before awarding him the 15th and final point.

But in retrospect, what happened in the final wasn't terribly surprising, since Massialas needed one of the biggest rallies in recent Olympic history simply to reach the semifinals.

Massialas cruised to victory in his first two matches before running into Italy's Giorgio Avola, who got on a run and jumped ahead 14-8 in a sport where 15 points clinches victory.

Massialas rallied with seven straight points, drawing the crowd to its feet with his winning touch.

The highly anticipated semifinal matchup between Massialas and teammate Gerek Meinhardt failed to materialize when Meinhardt lost to Great Britain's Richard Kruse 15-13.

Garozzo beat Timur Safin of Russia 15-8 to earn a shot at the gold medal, while Massialas rolled past Kruse 15-9.

Massialas, Meinhardt, Race Imboden and Miles Chamley-Watson, who lost his first match, will compete again Friday as one of the favorites in the team competition.

"We'll all be able to recover and get refocused," Meinhardt said. "All of us are ready. ... We know it's our best chance."