Real Madrid's unbeaten league start was ended as they were stunned 1-0 by promoted Real Mallorca.
It was Mallorca's best win since their promotion and moved them out of the relegation spots and into 14th place.
Real were without injured trio Gareth Bale, Luka Modric and Toni Kroos, and summer signing Eden Hazard was also missing after his wife had given birth.
Odriozola allowed Lago Junior to cut inside him onto his right foot and curl a splendid shot past Thibaut Courtois - his first La Liga goal coming two seasons after he was playing in the third tier for Malaga.
Elsewhere Athletico Madrid remain fourth, three points behind Barcelona and one adrift of surprise package Granada after drawing 1-1 at home against Valencia.
Getafe registered their third straight win in all competitions thanks to forward Angel Rodriguez's second-half double in a 2-0 home victory against Leganes.