RIO DE JANEIRO (AP) — The United States saw a pair of fencers put themselves in position to win unprecedented gold medals at the Rio Games.

Neither came through.

But simply getting to the finals helped show how far the Americans have come in a sport where they've long struggled.

Third-ranked Aron Szilagyi of Hungary beat upstart U.S. fencer Daryl Homer to win gold in men's sabre Wednesday.

Despite the loss, Homer earned the second silver medal for the American men's fencing team in Rio, joining Stanford's Alexander Massialas.

"We're trying to raise the visibility of the sport," Homer said. "We are very competitive with each other, and it's great. I love that."

Homer's impressive final touch gave him a thrilling 15-14 victory over Iran's Mojtaba Abedini in the semifinals and put him within a win of the first gold for the U.S. men in the modern era.

Szilagyi proved to be too much for the 10th-ranked American, who fell 15-8.

Still, the Bronx-born Homer finished as well as any U.S. fencer in his weapon ever had.

Homer found out about fencing when he was five by reading his dictionary. He begged his mother, Juliette Smith, to let him try out the sport, and Homer wound up under the tutelage of former American fencer Peter Westbrook

Westbrook's foundation is designed to mentor inner-city youth through fencing. It has also been crucial in the career of Ibtihaj Muhammad — who made history on Monday as the first U.S. athlete to compete wearing a hijab.

Homer emerged as one of Westbrook's prized pupils, earning spots on four All-America teams while at St. John's. He took silver at a world championship event in 2015, continuing the country's steady rise in fencing from the Beijing and London Olympics.

Homer won his first three matches Wednesday by relatively comfortable margins to reach the semifinals. Homer then faced a furious challenge from Abedini, who overcame a seven-point run from Homer to force a do-or-die situation.

Homer exploded to the center of the piste for a touch that put him into the finals.

"I was like 'No regrets. If I lose doing this, I'm going to lose doing this and I don't care.' And that was literally how I rolled out," Homer said. "If you want a medal, you have to do something big for it."

But Szilagyi never let the athletic Homer dictate the pace of the match, instead neutralizing Homer with quick strikes that put the American in a hole too deep.

"Daryl is a very aggressive, very dynamic fencer," Szilagyi said. "My strategy was to break his dynamism ... and not let him aggressively attack me."

Russian Inna Deriglazova won gold in women's foil, giving her country its second fencing title of the Rio Games.

Deriglazova beat Italy's Elisa Di Francisca, the gold medalist from the London Olympics, 12-11 to claim a world title for the second year in a row.

Deriglazova found herself up a point with just 2.5 seconds left, a situation that tested the old adage that athletes who compete not to lose typically lose.

But Deriglazova was able to run backward until the clock ran out.

"Whatever it took to do in those last two seconds, to run away, to fall down, I would do that. It didn't matter," Deriglazova said.

Third-ranked American Lee Kiefer lost in the round of 16, and said afterward that this will likely be her last Olympic appearance.