Clint Dempsey reacts after tying Landon Donovan’s U.S. scoring record during the second half of the Americans’ Gold Cup semifinal win over Costa Rica. LARRY W. SMITH/European Pressphoto Agency

ARLINGTON, TEX. — Bruce Arena has treated the CONCACAF Gold Cup as a testing ground for several secondary players. But make no mistake: He also wants to win the championship very badly.

And so with Saturday’s tense semifinal with Costa Rica scoreless midway through the second half, Arena turned to an old warrior, Clint Dempsey. Six minutes after entering, the east Texas native rushed past one defender, then another before setting up Jozy Altidore for the breakthrough goal.

Another 10 minutes passed, and Dempsey stung a 25-yard free kick into the near corner, tying Landon Donovan’s U.S. men’s scoring record and punctuating a 2-0 victory before 45,516 at AT&T Stadium.

The Americans advanced to the final for a record 10th time and will play reigning champion Mexico or Jamaica on Wednesday at Levi’s Stadium in Santa Clara, Calif. The other semifinal is Sunday at the Rose Bowl in Pasadena, Calif.

Altidore put the United States ahead in the 72nd minute, running onto Dempsey’s well-weighted through ball and driving a left-footed one-timer past goalkeeper Patrick Pemberton for his 38th international goal.

Dempsey followed with his 57th, bending a set piece around the defensive wall and between Pemberton and the right post. From the Fox Sports broadcast booth, Donovan, Dempsey’s longtime teammate, smiled.

The teams will meet again Sept. 1 in Harrison, N.J., for a more important match: a 2018 World Cup qualifier. Both teams are in the thick of the race for a berth in next summer’s tournament in Russia.

The Gold Cup has no bearing on the World Cup, but with the teams set to collide again so soon, this encounter carried psychological implications.

Arena showed another new look to his ever-changing lineup, pairing Altidore and Jordan Morris on the front line and Michael Bradley and Kellyn Acosta in central midfield. Darlington Nagbe pushed wide.

The Altidore-Morris collaboration left Dempsey on the bench, but after playing 90 minutes 72 hours earlier against El Salvador, the 34-year-old forward figured to begin in reserve.

Graham Zusi, Jorge Villafaña and Matt Besler returned to the back line, joining Omar Gonzalez, a quarterfinal goal-scorer with Dallas roots.

The Americans got off to a roaring start as Paul Arriola and Altidore combined to set up Morris for a near-side bid that clanged off the right post a mere 11 seconds after the opening whistle.

In the 15th minute, Morris sprung Altidore for a cross that Acosta hooked wide from close distance.

The U.S. attack hummed with confidence and conviction, leaving the Ticos to absorb and counterattack.

They did not mount a serious threat until the 37th minute, when Bryan Ruiz embarked on a 40-yard run through the heart of the resistance and supplied Marco Ureña slipping into the penalty area. Tim Howard charged off his line and used a sweeping kick save to prevent a deficit.

Early in the second half, with Pemberton pulled out of position by Morris’s infiltration, Zusi’s high cross missed Altidore and Nagbe prowling at the edge of the six-yard box.

The pace of the match picked up, and both teams were one killer pass from shattering the deadlock.

Dempsey, who grew up three hours east of the Dallas area in Nacogdoches, Tex., entered to a thunderous ovation in the 66th minute in place of Arriola.

Pemberton made a leaping save on Acosta’s rasping one-timer from the top of the penalty area. Howard answered with a fully extended reach on Ureña’s low shot.

The match was building toward a goal, and a moment after Costa Rica’s threat, Dempsey sent Altidore into the clear and “Deuce,” as Dempsey is known, added the second goal.

Before the match, CONCACAF announced multi-game suspensions for two Salvadoran players involved in incidents during the quarterfinal against the United States on Wednesday in Philadelphia.

The tournament’s three-member disciplinary committee ruled the duo had engaged in “anti-sporting behavior.”

Henry Romero received a six-game ban for biting Altidore on the shoulder and pinching the U.S. striker’s nipple. Darwin Ceren was given a three-game penalty for biting Gonzalez on the back of the shoulder.

The suspensions cover official international matches. El Salvador was eliminated from the Gold Cup, the regional championship, by the United States and isn’t involved in the final round of 2018 World Cup qualifying.