MARSEILLE, France (AP) — Juanlu Sanchez came off the bench to propel Spain into a record-equaling fifth Olympic men’s soccer final on Monday.

Sanchez scored in the 85th minute at Stade de Marseille, securing a 2-1 victory over Morocco and setting up a final clash against either France or Egypt at the Paris Games.

“The moment passed so fast that I didn’t even realize it, but then when you realize that you scored the goal that puts your team in the final, well, I’m really happy,” Sanchez said.

Morocco led 1-0 at halftime after the tournament’s leading scorer, Soufiane Rahimi, converted a penalty in the 37th minute.