Eight months and two coaches after Mexico crashed out of an embarrassing World Cup, most of the same players triumphantly raised the CONCACAF Gold Cup amid confetti and raucous cheers Sunday night.

El Tri has reversed its fortunes with stunning speed, and its winning goal at SoFi Stadium came on an end-to-end play that was every bit as dramatic.

Late substitute Santiago Giménez scored after an electrifying sprint in the 88th minute, and Mexico won the Gold Cup for the record ninth time with a 1-0 victory over Panama.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Mexico players celebrate

Mexico players celebrate with the winners trophy after beating Panama 1-0 after the CONCACAF Gold Cup final soccer match Sunday, July 16, 2023, in Inglewood, Calif. (AP Photo/Ashley Landis)

After Edson Álvarez slid to block Iván Anderson's cross in the Mexico penalty area, Orbelín Pineda dribbled away and made a tremendous pass into the center circle. Giménez, the 22-year-old Feyenoord forward, dribbled past Harold Cummings and outraced Cummings and Fidel Escobar into the penalty area.

Giménez scuffed a bouncing left-foot shot over goalkeeper Orlando Mosquera for his fourth goal in 18 international appearances and his second of the tournament.

"It’s the biggest moment of my career," Giménez said. "I just tried to get down the field quickly. We followed our principles throughout the game, and they worked perfectly. The result was great, because there were a lot of competitive teams in this tournament."

The goal by the Argentina-born Giménez, who came on only three minutes earlier, set off a frenzied celebration at a Southern California stadium packed with fans celebrating Mexico's revival in this biennial CONCACAF tournament. After Mexico was eliminated in the group stage of the World Cup for the first time since 1978, El Tri rebounded with an excellent tournament under interim coach Jaime Lozano, who took over the beleaguered program only a month ago after a Nations League loss to the U.S.

"Today the environment was like being in a World Cup," said Lozano, whose contract is only for this tournament. "It wasn’t like a Gold Cup. I’m dreaming after I saw a stadium like we saw today, and to provide people with the happiness we’ve seen. Again, the team gave everything. We knew that we were writing history, and you have to take these opportunities."

RYAN REYNOLDS' WREXHAM SET TO BEGIN US TOUR, SCHEDULED TO PLAY CHELSEA, MANCHESTER UNITED

Cesar Montes lifts trophy

Mexicos Cesar Montes lift the winners trophy after beating Panama 1-0 in the CONCACAF Gold Cup final soccer match Sunday, July 16, 2023, in Inglewood, Calif.  (AP Photo/Ashley Landis)

Mexico, which allowed just two goals in its matches, has won this tournament more than all other nations combined. The U.S. has seven Gold Cup titles and Canada one.

Giménez's heroics ended an inspiring Gold Cup run by Panama, which upset the U.S. in the semifinals to earn its third appearance in the final. Los Canaleros couldn't get several solid scoring chances past veteran Mexican goalkeeper Guillermo Ochoa.

Panama also lost the Gold Cup final in 2005 and 2013, both to the U.S.

"We gave everything we had," coach Thomas Christiansen said through a translator. "The team died standing. There is nothing I can regret from my players. Some people remove the (postgame) medals when they are the runner-ups, but I told them they should be proud of the achievements because of the soccer they played."

While the Gold Cup is notorious for featuring half-strength national teams, Mexico began the final with eight starters who also started at last year's World Cup.

Mexico dominated play for most of the first half with 14 shots, but Panama defended capably. Henry Martín appeared to put Mexico ahead in the 33rd minute with a close-range goal, but a video review several minutes after the play found him offside.

INTER MIAMI CELEBRATES LIONEL MESSI'S ARRIVAL; SOCCER GREAT OFFERS WARNING ABOUT MLS EXPECTATIONS

Santiago Giménez celebrates with teammate

Mexicos Santiago Gimenez (11) celebrates with a teammate after a 1-0 win over Panama during the CONCACAF Gold Cup final soccer match Sunday, July 16, 2023, in Inglewood, Calif.  (AP Photo/Mark J. Terrill)

Pineda and Martín both had tantalizing chances in the 43rd minute, but Mosquera stopped their consecutive point-blank shots.

Panama got its best scoring chance shortly after halftime, but Alberto Quintero put his header just wide of the far post. Edgar Bárcenas had another good-looking chance in the 87th minute, but missed wide from outside the box.

Moments later, Giménez scored his biggest goal for Mexico and gave optimism to fans hoping he'll be the centerpiece of a new generation of Mexican talent.

Lozano, who coached Mexico’s Olympic team to a bronze medal in Tokyo two years ago, was hired to lead the Gold Cup campaign by Juan Carlos Rodríguez, who took over as Mexican Football Federation president only a month earlier. Mexico’s World Cup disappointment led to coach Tata Martino’s departure and Diego Cocca’s brief tenure before the arrival of Lozano, who largely relied on the core of his Olympic team at the Gold Cup.

FIFA President Gianni Infantino congratulated Lozano on stage and wished him luck for the 2026 World Cup cycle, unaware that Lozano's contract is now up.

CLICK HERE TO GET THE FOX NEWS APP

Mexico Players celebrate

Mexico players celebrate with the winners trophy after beating Panama 1-0 after the CONCACAF Gold Cup final soccer match Sunday, July 16, 2023, in Inglewood, Calif. (AP Photo/Ashley Landis)

"I would love to be here," Lozano said. "It’s a dream to lead my national team in the World Cup, specifically a World Cup that is going to be hosted by Mexico and (the U.S. and Canada). If it is me, I’m going to have to work hard with my coaching staff. If it isn’t me, I’m going to support the team."

Anybody who thought the absence of the hosts’ national team would lead to an anticlimactic Gold Cup final doesn’t know Southern California very well: The sellout crowd south of downtown Los Angeles was overwhelmingly dominated by fans of El Tri, which is treated like the home team whenever it plays in this area -- even against the American team.

Just a month after frustrated Mexican fans boycotted the third-place match of the Nations League in Las Vegas against Panama, that passionate base returned in full voice to the Los Angeles Rams’ palatial NFL stadium.