Clint Dempsey equaled Landon Donovan's all-time U.S. men's national team goals record of 57 with an 82nd-minute strike Saturday in a 2-0 Gold Cup semifinal win over Costa Rica.

The game turned when U.S. coach Bruce Arena brought Dempsey in as a substitute midway through the second half. Dempsey set up Jozy Altidore for the breakthrough goal before adding his own strike from a free kick.

"I saw the keeper cheating a little bit, and it went in," Dempsey said.

Playing in his home state of Texas, Dempsey, 34, reached the milestone in his 136th appearance for the senior team, good for third all time. It took Donovan 153 games to set the mark.

Jozy Altidore is third on the list with 38 goals, and Eric Wynalda is fourth with 34.

"Congratulations, Clint," Donovan said while working on the Fox telecast of the game. "Feel free to stop now. We'll share it together."

The goal came for Dempsey, who was added to the U.S. squad only for the knockout rounds, as the national team tries to win its sixth Gold Cup and first since 2013.

Dempsey scored three times in his return to competitive action for the U.S. team in a 6-0 win over Honduras in March, after he was diagnosed in August 2016 with an irregular heartbeat that kept him out for the remainder of last year.

"Coming back from two heart procedures, being able to still play at this level?" Dempsey said. "Living a dream. So I'm happy.''

Dempsey's assist was his 20th for the national team.

A veteran U.S. international, Dempsey is no stranger to scoring big goals. He found the net against Egypt, Spain and Brazil as the U.S. reached the 2009 FIFA Confederations Cup final. He also scored the tying goal against England in the Americans' 2010 World Cup opener and netted 30 seconds in against Ghana in the U.S. opener at the 2014 World Cup in Brazil.

Abby Wambach scored 184 goals in 255 caps for the U.S. women's national team, the most by any player -- man or woman -- in FIFA history. Dempsey and Donovan would be tied for 10th on the USWNT all-time scoring list.