David Villa's goal in injury time gave World and European champions Spain a 2-2 draw at lowly Costa Rica in a friendly international football match.
Spain, hoping to bounce back after a 1-0 friendly defeat to England on Saturday, were listless in their attack in the first half of the contest, played at a rainy Estadio Nacional.
Their defence lacked sharpness, as they fell 2-0 down by halftime before rallying after the break.
Randal Brenes scored in the 30th minute for Costa Rica and Arsenal striker Joel Campbell added another for the hosts in the 41st.
Villa scored in the 83rd before grabbing the equaliser at the finish.
Goalkeeper Iker Casillas made his 127th appearance for Spain, becoming the country's most-capped player.
But his milestone was marred by an uncharacteristic mistake when he failed to control the ball in the area, allowing Brenes to gain possession and fire into an empty net.
Campbell made it 2-0 with a powerful shot past Casillas.
Spain, who have swept through their Euro qualifying campaign, have apparently found it harder to get the competitive juices flowing for friendlies.
Their defeat at Wembley was their fourth in a friendly since they won the World Cup, and they were clearly keen to avoid a repeat as they stepped things up in the second half after a spate of substitutions.
After the break they gradually seized control, Barcelona striker Villa threatening repeatedly before finally coming through.
He headed in the equaliser in the first minute of injury time to leave the hosts stunned.