Fourth-tier Cacereno pushed Real Madrid all the way in their third-round Copa del Rey tie.
It needed a moment of magic from Madrid's Brazilian forward Rodrygo to resolve a match that was much more complicated than most would have expected.
The first half was an even affair with Cacereno by no means inferior to their illustrious rivals, and little changed after the break as the home side continued to dig deep.
Rodrygo's individual goal decided the game, but the home side are out of the tournament with their pride intact on a night of surprises in Spain's knockout competition.
Ceuta, who are bottom of the third-tier RFEF I, beat La Liga's bottom side Elche 1-0 thanks to Rodri's 44th-minute penalty. To make matters worse for Elche, Ezequiel Ponce was sent off 15 minutes into the second half in a disastrous result for a side that has only four points in La Liga.
Second division Sporting Gijon beat top-flight Rayo Vallecano 2-0 with two second-half goals from Serbian striker Uros Milovanovic, while fellow second division outfit Levante won a thriller 3-2 against Getafe.
Valencia had no such problems as they cruised past third-tier La Nucia with goals from Justin Kluivert, Ilaix Moriba and Hugo Duro, while Villarreal recovered from a goal down to thrash second division Cartagena 5-1, with Alex Baena, Arnaut Danjuma, Jose Luis Morales, Samuel Chukwueze and Etienne Capoue all scoring second-half goals.