Irvin Herrera was one of three Cosmos players on the El Salvador team for the Gold Cup. (Photo courtesy of the Cosmos)

MIAMI — Cosmos forward Irvin Herrera has been ruled out of El Salvador’s team for the CONCACAF Gold Cup with an injury.

He has been replaced by Edwin Sanchez, who plays for CD Aguila in El Salvador.

The exact nature of Herrera’s injury was not immediately known.

Herrera was one of three players from the two-time North American Soccer League champions on the squad, along with midfielders Andres Flores and Richard Menjivar.

Herrera’s goal lifted the El Salvadorans to a 1-0 win over Nicaragua that helped them secure third place in Copa Centroamericana and a Gold Cup berth in Panama City, Panama Jan. 22.

The move was one of five injury-related roster changes approved by CONCACAF, the confederation announced Friday.

New York City FC defender Ronald Matarrita of Costa Rica was forced to drop out of the competition last week after suffering a broken leg. He was replaced by Juan Pablo Vargas.

In accordance with the competition regulations, injury-related changes are allowed to the final 23-player rosters for the group stage until 24 hours before each team’s first match. Any injury replacements must come from the preliminary 40-player rosters and must be approved by the Gold Cup medical committee.

The following substitutions were approved by the committee:

COSTA RICA

IN: Juan Pablo Vargas (CS Herediano, CRC)

OUT: Ronald Matarrita (New York City FC, USA)

EL SALVADOR

IN: Edwin Sanchez (CD Aguila, SLV)

OUT: Irvin Herrera (New York Cosmos, USA)

JAMAICA

IN: Shaun Francis (San Jose Earthquakes, USA)

OUT: Dever Orgill (Wolfsberger AC, AUT)

MEXICO

IN: Erick Torres (Houston Dynamo, USA)

OUT: Alan Pulido (Chivas Guadalajara, MEX)

UNITED STATES

IN: Chris Pontius (Philadelphia Union, USA)

OUT: Kenny Saief (KAA Gent, BEL)

As in past years, teams that qualify for the quarterfinals will be permitted to amend their 23-player roster following the group stage, by replacing up to six players with new players from the original 40-player provisional rosters announced June 7.

The 14th edition of the continental championship Friday at Red Bull Arena in Harrison, N.J.

Twelve nations will play in 13 U.S. cities in a span of 20 days, culminating in the final game on July 26 at Levi’s Stadium in the Bay Area, where ticket sales have surpassed 50,000.

Friday’s doubleheader features a Group A match-up of perennial Central American rivals, Honduras and Costa Rica as well as the 2000 champion Canada facing newcomer French Guiana.

Group B kicks off on Saturday at Nashville’s Nissan Stadium, with a rematch of the 2015 Gold Cup third-place match between USA and Panama, followed by Martinique and Nicaragua.

Defending champion Mexico will begin its title defense Sunday, July 9 at Qualcomm Stadium in San Diego against El Salvador as the second match of a doubleheader. Curacao and Jamaica will begin Group C play in the first match that day.