Real Madrid were looking comfortable. Zinedine Zidane's side had the better off the first half at Sevilla and took the lead through a Cristiano Ronaldo penalty. There appeared little danger, but one moment changed everything.
Sergio Ramos had been in the headlines after the sides' Copa del Rey clash on Thursday night, when he had been the subject of abuse from fans of his former club and caused controversy first with a Panenka penalty and also afterwards as he gestured to the supporters that had been baiting him.
The Madrid captain, who started his career at Sevilla, claimed he was entitled to defend himself after the supporters had been "remembering my mother since the first minute" and Real also backed their skipper.
But obviously there was more abuse aimed at the 30-year-old in this match, even though some Sevilla supporters were uncomfortable with that treatment to one of their former players.
Ramos started in the middle of a three-man back line, with Raphael Varane on the right and Nacho on the left. It was a surprising tactical tweak by Zidane, but it worked well for much of the evening.
This match was much less intense than Thursday's Copa clash. Sevilla were taking fewer risks, while there was more at stake for Real. Three at the back meant Madrid often had a spare man further forward as well and Los Blancos more than held their own.
In the second half, they started strongest and were pushing for the opening goal when Sergio Rico clattered into Dani Carvajal in the area and Cristiano Ronaldo (who had looked short of match fitness after his recent rest and gave the ball away a number of times) fired them in front from the spot.
On the sidelines, Sampaoli held his head in frustration. Once again it looked like Madrid would win an important away fixture. But just like on Thursday, when Real came back from 3-1 down to claim a 3-3 draw, two late goals altered the perspective and also the outcome of this match.
First Ramos headed into his own net. So often the man for the big occasion, a player who is renowned for providing late levellers and heroic goals for Madrid, he had done it at the wrong end this time and could barely believe it.
Suddenly, from their position of power, Madrid were on the rack as the Sanchez Pizjuan urged Sevilla to find a winner. Real instantly lost their calm, their dominance in midfield and now they looked vulnerable - with even the immense Casemiro now making mistakes.
Karim Benzema lost the ball in added time and January signing Stevan Jovetic (who scored within nine minutes after making his debut on Thursday) took advantage to beat a poorly positioned Keylor Navas in a frenetic finale as the Sanchez Pizjuan erupted.
Madrid will wonder how they lost it, but their 40-match unbeaten run is now gone and La Liga is wide open again (with Sevilla a point behind and Barca one further back - albeit both having played one more game than Real). And unfortunate as it may have been, it all started with Sergio Ramos.