MADRID (AP) — David Villa earned two penalties and leading Spanish league scorer Diego Costa converted one of them as Atletico Madrid won 2-1 at Granada on Thursday to continue its early-season momentum.

Granada defender Diego Mainz barged into the back of Villa to send the Spain striker to the ground inside the area and Costa stepped up to the spot to score his 12th league goal in the 38th minute.

Costa showed no effects of the news that his Brazilian citizenship may be revoked after he elected to play for Spain's national team, as the forward was a constant threat for Atletico and forced several saves from goalkeeper Roberto.

Villa then went down easily from Jeison Murillo's challenge to draw the second penalty in the 78th, which he scored himself for his fifth goal of the season.

"Penalties are part of the game, but winning away from home is difficult," Atletico coach Diego Simeone said. "I like that the team knows how to suffer when it needs to suffer, because we're going to need to know how to maintain the position we're in."

But Atletico nearly paid the price for not putting the game away earlier as Odion Ighalo pulled a goal back with a header in the 90th, moments after Filipe Luis was shown a second yellow card, ensuring a nervy finish at Los Carmenes Stadium.

"We should have put the game away earlier," Simeone said.

Atletico moved back to within one point of leader Barcelona while moving five points above Real Madrid.

Barcelona leads with 31 points after 11 rounds. Atletico has 30 points and Madrid, which beat Sevilla 7-3 on Wednesday, has 25.

Also on Thursday, Ciprian Marica scored early and substitute Pablo Sarabia added another goal in stoppage time as Getafe handed Villarreal its first loss at its Madrigal Stadium, 2-0.

Levante goalkeeper Keylor Navas saved Jorge Molina's 75th-minute penalty to preserve a 0-0 draw at Real Betis, which played the last hour with 10 men following Chica Torres' sending off.

Meanwhile, Athletic Bilbao rallied from a two-goal deficit to draw 2-2 against Elche.

David Lomban powered a corner kick past goalkeeper Iago Herrerin after nine minutes to put Elche ahead, and the visitors doubled their advantage at the San Mames two minutes after the break when three Bilbao players failed to clear a loose ball which fell to Aaron Niguez to score.

But Athletic is used to falling behind early and quickly rallied starting in the 54th when Markel Susaeta met Iker Muniain's perfectly weighted floated pass across the area to sidefoot beyond Manu Herrera.

Substitute Aritz Aduritz timed his run perfectly to head home a 69th-minute equalizer as the Basque club pressed for a winner and came close on several occasions, with Gaizka Toquero's header going wide with five minutes to play.

Athletic joins Villarreal in fourth place with 20 points, one better than Getafe.