After being level at 2-2 heading into stoppage time Sevilla scored twice to beat Granada 4-2.
The visitors took the lead through Darwin Machis who opened the scoring in the 23rd minute.
The lead was short-lived as Sevilla leveled things through Diego Carlos in the 32nd minute before eventually taking the lead when Lucas Ocampos added their second in the 66th minute of the game.
Sevilla was staring at another costly stumble after Víctor Díaz equalized by heading home a corner kick with just two minutes remaining in regulation time to make it 2-2.
An injury forced a lengthy added time and the hosts capitalized to seal all three points.
The hosts pressed for the winner which came when striker Rafa Mir steered in a superb headed pass by Ivan Rakitic after Papu Gómez found him in the area with a lob.
Gómez, who entered the game with Mir with around 20 minutes left, capped the victory by scoring after Oliver Torres squared the ball into the heart of the box in the ninth and final minute of injury time.
Their first win in five rounds lifted them three points clear of Barcelona and Atlético Madrid who both have games over the weekend.