LISBON — Real Madrid’s record 10th European title will be written down as a seemingly convincing 4-1 victory over Atletico Madrid.
In reality, ‘‘La Decima’’ was a lot harder to come by.
Atletico was minutes away from its first Champions League title Saturday when Sergio Ramos began Real’s comeback by heading in the equalizer in injury time. Real then broke down Atletico’s resistance with three goals in the last period of extra time to create an unfairly lopsided score.
‘‘It’s the most important goal I've ever scored,’’ Sergio Ramos said of his game-changing strike. ‘‘We made history against a great rival. ‘‘
As Atletico faded, Gareth Bale scored the winning goal with a header in the 110th minute, before Marcelo slotted in the third in the 118th and Cristiano Ronaldo polished off the win with a penalty at the end.
‘‘Madrid was better,’’ said Atletico coach Diego Simeone, who lost his temper toward the end after failing to complete a La Liga-Champions League title double. ‘‘They were able to get out on the break and that hurt our chances.’’
Diego Godin had put Atletico ahead when his 36th-minute header looped into the Real goal left vacant by captain and veteran goalkeeper Iker Casillas’s reckless rush out.
Atletico — which had to substitute striker Diego Costa early in the first half — then simply wore out in extra time as the team failed to follow up on the Spanish league title it secured last weekend.
Had Atletico held on for its first European title, Ronaldo and Bale would have shared some of the blame for a series of missed chances in the 90 minutes.
Instead, the star forwards added to their storied club’s history in club football’s most prestigious competition.
‘‘I've learned from past experiences to keep going, to forget about the chances you miss and keep persevering,’’ Bale said. ‘‘The celebrations of the crowd meant everything to me.’’
Real coach Carlo Ancelotti also ties the record with three European Cup victories as a coach, after winning in 2003 and ’07 with AC Milan. The Italian becomes the fifth coach to win with two clubs.
‘‘The hardest thing was to tie the game because it was so tough for us at that point,’’ Ancelotti said.
Casillas also won his third Champions League title, being the only player remaining from the club’s 2000 and ’02 victories.
After Ramos’s goal made up for his own mistake, Casillas ran deep into Atletico’s half to share a long celebratory hug with Marcelo.
Bale’s decisive goal sparked wilder celebrations, while Ronaldo pulled off his shirt before provoking tempers with a muscle-flexing pose after scoring his penalty — extending his record for a Champions League season to 17 goals.