TALLINN, Estonia (AP) — Atletico Madrid finally got the better of Real Madrid on the European stage, scoring twice in extra time to win 4-2 in the UEFA Super Cup final on Wednesday in its rival's first game without Cristiano Ronaldo.

Atletico got off to a flying start with Diego Costa scoring the competition's fastest goal just 50 seconds in, but Madrid came back to take a 2-1 lead as Los Blancos tried to prove they can still win trophies without Ronaldo and with a new coach.

But Costa equalized late in the match with his second goal before Saul Niguez and Jorge "Koke" Resurreccion sealed the victory in extra time on a cool night in Estonia's capital.

Atletico's victory over its crosstown rival had added significance after it lost two Champions League finals to Madrid in 2014 and 2016. Diego Simeone's team was also eliminated by Madrid in the 2017 semifinals.

"I'm elated," Costa said. "Real Madrid has always beaten us in these finals. It was our turn to win a final."

The loss leaves new Madrid coach Julen Lopetegui still having to prove that there is life after Ronaldo, who scored 450 goals in 438 matches before joining Juventus this summer and helped lead the club to three straight Champions League titles.

"I'm sad. I'm frustrated. It's a final that we lost," Lopetegui said. "But I also know that we will have to wake up and prepare ourselves for our first league match and start the season on the right foot."

Gareth Bale showed glimpses of his pace and skill, but couldn't mimic Ronaldo's ability to decide a game on his own.

Instead, Costa was the one who dominated at the Lillekula Stadium in Tallinn. He overpowered Madrid's center backs in the first minute after a long ball from Stefan Savic, first winning a header against Sergio Ramos and then muscling past Raphael Varane to cut into the area where he beat goalkeeper Keylor Navas at the near post.

Karim Benzema equalized in the 27th minute, heading in a pinpoint cross from Bale, who was able to break away from Lucas Hernandez on the right and curl the ball into his fellow forward's path. Bale, who was given a freer role than he's used to, caused trouble for Atletico's defense in the first half as he switched between wings. He was Madrid's main creative spark at that point, with his teammates constantly trying to feed him the ball.

He faded in the second half, but Lopetegui was pleased with Bale's performance.

"Gareth has played very good. In this moment of the season, all the players are not in the best physical way," the coach said. "We are happy with his performance and we hope he's going to put in deserved performances in the next matches."

Sergio Ramos scored a penalty in the 63rd minute after Juanfran Torres handled in the area as the ball flew over him from a corner.

Juanfran made up for it in the 79th by taking the ball off Marcelo near the touchline and then passing to Angel Correa. The substitute then skipped past a couple of Madrid defenders and cut the ball back from the byline to Costa, who poked the ball into the roof of the net.

In extra time, substitute Thomas Partey set up the decisive goal when he stripped the ball off Varane and played a one-two with Costa before dribbling toward the byline. Partey then cut the ball back to Saul Niguez, who volleyed the ball first-time to send the ball past Navas to make it 3-2 in the 98th. Koke finished Madrid off with a cool finish in the 104th.

Lopetegui, who joined Madrid in controversial fashion and was fired as Spain coach just before the World Cup, will need to show that he can build on the success of predecessor Zidedane Zidane and can win with new tactics.

At times, Madrid looked uncomfortable playing under the new possession-based system and seemed to miss Ronaldo's flair and proficiency.

"We need to improve on the all the phases of the team," Lopetegui said. "We don't like to make mistakes."

Madrid had to play without new goalkeeper Thibault Courtois, as the former Atletico player didn't even dress for the match. Spanish media reports said the team didn't register him in time with UEFA following his transfer from Chelsea.

For Atletico, the victory gives the team a boost before the season starts, Simeone said.

"The club is growing. We have a new stadium," he said. "We have players who want to join us, players who don't want to leave us. I think this speaks volumes."

___

More AP Soccer: https://apnews.com/tag/apf-Soccer

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.