BARCELONA, Spain (AP) — The best and the worst of Diego Costa were on full display Saturday, when the Atletico Madrid striker was sent off after celebrating a goal that helped beat Getafe 2-0 in his second match back at the club.

Costa already had one booking for elbowing a Getafe player when he tapped in Atletico's second goal in the 68th minute. But instead of embracing his teammates, he ran around the net and to the edge of the stands where he was hugged by thrilled fans, earning him a second booking.

The goal was Costa's second in as many appearances since making his return to Atletico from Chelsea. He scored as a substitute on Wednesday to help it ease to a 4-0 victory at Lleida in the Copa del Rey's round-of-16.

Far from reproaching Costa, Atletico coach Diego Simeone praised the player he hopes can lead the team to the same heights they reached in 2013 and 2014, when they won the Copa del Rey followed by the Spanish league title.

"Costa gives us intensity and power, and he inspires fear. You can feel it and see it," Simeone said.

The victory allowed second-place Atletico to move to within six points of Liga leader Barcelona, which hosts Levante on Sunday.

Despite not having played a match since June, Costa has shown no rust from his long layoff while waiting for Atletico's yearlong ban on new players to expire last week.

Costa curled a shot onto the top of the net and went close to setting up Antoine Griezmann before the France forward assisted Angel Correa for the hosts' opener in the 18th.

Besides providing added punch to Atletico's attack, Costa also showed the same knack for rattling rivals with his aggressive attitude and physical play.

The Brazilian-born Spain striker had to be separated from Getafe's Juan Cala when the two exchanged words after the halftime whistle, and he was booked for elbowing Dakonam Djene when they contested a ball in the 62nd.

Then came his goal, a cool side-footed shot to slot Sime Vrsaljko's low cross just into the post, followed by his excessive celebration.

"(Costa) is contagious, and he showed all that he is, scoring a goal and getting sent off," Atletico midfielder Gabi Fernandez said. "Costa doesn't have to adapt to us, he came ready to play. That's why we wanted him."

The derby at Atletico's Wanda Metropolitano Stadium was a testy contest that featured 10 total bookings.

Costa's sending-off means he will miss next round's trip to Eibar.

Costa, 29, helped Chelsea win the English Premier league title last season before he fell out of favor with coach Antonio Conte.