Norway ended Spain's perfect record with a 1-1 draw in their European Championship qualifier on Saturday as Sergio Ramos overtook Iker Casillas' record of most appearances for Spain. Italy qualified for next year's tournament by beating Greece 2-0.
It was the first slip by Spain after winning all six previous qualifiers in Group F.
The 33-year-old Ramos surpassed Casillas' mark by making his 168th appearance for "La Roja." The central defender had already beaten the goalkeeper's record for most wins with the Spanish national team.
Spain looked set — like Italy — to book its spot in next year's continent-wide tournament but Norway equalized in stoppage time to snatch the point in Oslo.
Spain goalkeeper Kepa Arrizabalaga gave away the penalty by fouling Omar Elabdellaoui, allowing Joshua King to step up and equalize from the spot just before the final whistle.
Saúl Ñíguez had put Spain ahead with a long-range goal only two minutes after halftime, and Fabián Ruíz went close to sealing the win when he hit the post on two occasions. But the hosts pressed Spain into its area and the effort paid off with the last-gasp goal.
Spain leads the group with 19 points. Sweden has 14 after beating Malta 4-0. Romania has 13 points, and Norway has 10.
Italy ensured its qualification from Group J after defeating Greece in Rome.
Brazilian-born midfielder Jorginho converted a penalty after the hour mark after a handball by Andreas Bouchalakis. Then substitute Federico Bernardeschi scored from beyond the area with a shot that was deflected.
Roberto Mancini's squad extended its perfect record to seven wins in seven matches. It has 21 points. Next is Finland with 12.
Belgium became the first team to qualify for next year's tournament on Thursday.
The top two teams of each group qualify for the tournament next year. The other four qualifiers will come through four tiers of playoffs in March.
More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports