RIO DE JANEIRO — As his Italian conqueror pranced and preened around the arena, Alexander Massialas dropped to his knees and cried.

The fencer, born and raised in San Francisco, had lost a gold medal Sunday. But he had ended a 32-year medal drought for U.S. male fencers by winning silver in individual foil.

“It was overwhelming,” said Massialas, 22. “I wish I could have got gold, so it was sad a little bit. But I couldn’t be prouder to bring back a medal for the United States.”

His father Greg — Olympic coach and the head of the Massialas Academy in the Outer Sunset — hugged his son and spoke into his ear.

“It’s OK,” the elder Massialas, a three-time Olympian himself, told his son. “I’m so proud of you.”

Though fencing matches are short in duration, the day of competition is long. Massialas, the top-ranked foil fencer in the world, began his day in the morning with the first of five bouts. He was soaked through with sweat after each one.

In the quarterfinals, he mounted an epic comeback against Italian Giorgio Avola, going down 14-8, then winning 15-14.

But in the gold-medal match late in the afternoon against another Italian, Daniele Garozzo, Massialas fell behind 14-7. He kept looking back at his father, asking for advice, but it wasn’t until a rest period late in the bout that he was able to consult with his coach.

After the consultation, Massialas reeled off four points, but it was too late. Garozzo won the 15th point, and before the score was posted, he ran off the strip and to his fans where he posed, arms outstretched.

“I might have used up my luck for the day,” said Massialas, who started fencing when he was in elementary school at the Chinese American International School.

Massialas went to high school at Drew in San Francisco. He was the youngest male athlete on the American team in London in 2012, where he finished 13th. He postponed his senior year at Stanford to concentrate on the 2016 Olympics. He will return to finish his degree in mechanical engineering in September.

His mother, Vivian, and sister, Sabrina, were in the stands cheering for him. Sabrina, who fences at Notre Dame, is also on the national team, though women’s team foil is not included in these Olympics because of a weapon rotation. She will set her sights on Tokyo in 2020.

Massialas’ achievement shouldn’t be discounted by the color of his medal. The United States has lagged far behind other countries in fencing. Massialas is the first individual Olympic medalist the U.S. has produced in men’s fencing since Peter Westbrook won a bronze in 1984. The last time an American man did as well in foil was in 1932, when Joseph Lewis won a silver. Albert Axelrod won bronze in 1960.

Greg Massialas has had a hand in building the sport, including creating a prominent academy in San Francisco.

“This is something we haven’t had since 1932,” said Greg, who was on the 1980 team that boycotted as well as on the 1984 and 1988 teams. “It is a tremendous day for U.S. fencing. This is huge.”

In five days, Massialas and his teammates — including San Franciscan Gerek Meinhardt, who narrowly missed the medal round Sunday — will try to win a team gold. The team finished fourth in London.

“I’d like some redemption,” Massialas said.

And what about the future?

“My dad’s a three-time Olympian,” Massialas said. “I can’t have him hold that over me.”

Ann Killion is a San Francisco Chronicle columnist. Email: akillion@sfchronicle.com Twitter: @annkillion