Atletico Madrid welcomed Levante to the Vicente Calderon on Saturday knowing that they would move top of the La Liga table if they avoided defeat.
Andreas Ivanschitz sent the away side ahead inside the first minute, but Diego Godin headed Atletico level after 30 minutes to leave the two sides on terms at the interval.
Atletico were ahead in the early stages of the second period courtesy of Diego Costa's 18th league goal of the season, but a stunner from Pedro Rios levelled the scores just before the hour mark.
The home side continued to force the issue in the latter stages, however, and found a winner 13 minutes from time when Costa converted from the penalty spot.
Read how it all unfolded in Sports Mole's minute-by-minute live commentary of the action below.
ATLETICO MADRID: Courtois; Juanfran, Godin, Miranda, Luis; Gabi, Koke, Tiago; Turan, Costa, Villa
LEVANTE: Navas; Navarro, Lopez, Karabelas, Vyntra; Juanfran, Diop, Simao, Garcia; Ivanschitz, Barral