Cristiano Ronaldo's deflected shot in the fourth minute of stoppage time snatched a dramatic 3-2 La Liga victory for a below-par Real Madrid at lowly Levante on Saturday.
Real are flying in Europe after resounding Champions League victories over Galatasaray and FC Copenhagen but turned in another disappointing domestic performance following last weekend's 1-0 defeat at home to Atletico Madrid.
They twice had to come from behind at Levante's Ciutat de Valencia stadium before Ronaldo rifled a shot from the corner of the area and it glanced off a defender before ricocheting into the net off a post.
It was desperately hard on a plucky Levante side and their fans but moved Real back above Villarreal into third place, within two points of champions Barcelona and Atletico.
Barca and Atletico have both won all seven matches and can restore their five-point advantage over Real with respective victories against Real Valladolid later on Saturday and against Celta Vigo on Sunday.
Levante, whose entire squad is worth just over a third of the record 100 million euros ($136 million) Real paid for Wales winger Gareth Bale in the close season, took the lead in the 57th minute when Papa Babacar Diawara finished off a superb counter attack.
The goal appeared to wake the Real players from their lethargy and Sergio Ramos levelled four minutes later when he volleyed home an Angel Di Maria corner.
Levante rallied and substitute Nabil El Zhar fired through a crowd of defenders into the net in the 86th minute to put the home side within touching distance of an unlikely victory.
There was still time for plenty more drama and Real substitute Alvaro Morata levelled when he blasted the ball in from close range in the 90th minute.
Ronaldo, who ripped off his shirt after scoring the winner, now has seven goals in the league this season, one behind Barca's World Player of the Year Lionel Messi and Atletico forward Diego Costa.
($1 = 0.7355 euros)