AC Milan reached the Europa League group stage following a thrilling battle with Portugal’s Rio Ave on Thursday evening.
The Serie A giants. seven-times European champions, so nearly missed out on European football for the season as they trailed 2-1 deep into extra-time.
But Hakan Calhanoglu made it 2-2 from a penalty with the last kick of the match after Rio Ave defender Toni Borekovic handled the ball inside the area.
The play-off then went to penalties, where Milan came out on top in a 24-penalty shootout.
Both teams scored their first seven penalties, missed their eighth and scored their ninth.
They then each missed two in a row, with the two goalkeepers Gianluigi Donnarumma and Pawel Kieszek both missing from 12 yards, before Simon Kjaer netted Milan’s 12th penalty.
It left Aderaln Santos needing to score to continue the shootout but his effort was saved by Donnarumma, sealing a 9-8 win for Stefano Pioli’s side.
It was a dramatic ending to a highly entertaining match.
Milan had gone ahead through Alex Saelemaekers in the 51st minute before Francisco Geraldes levelled for Rio Ave.
Gelson then put the Portuguese side ahead at the start of extra-time but Borekovic’s late handball let Milan back into the contest.
“It's a magical night, for us it would have been a shame not to get past this round,” Pioli said at full-time, per the Daily Mail.
“This victory gives us strength to keep working and winning.”
Watch every penalty in the shootout
There were so many twists and turns in the shootout, including a Panenka, one effort hitting both posts and both goalkeepers showing why they're, well, goalkeepers. Watch it below.
Milan will find out their group stage opponents during Friday's draw.
They are in pot two, along with Rangers, Hoffenheim, AZ Alkmaar and eight more teams.
Pot one includes Arsenal, Tottenham, Roma, Napoli, Benfica, Bayer Leverkusen, Villarreal, CSKA Moscow, Braga, Gent, PSV Eindhoven and Celtic.
- Champions League draw in full
- Why Man Utd couldn't be drawn in Group C
- Messi vs Ronaldo: H2H in the Champions League