Seven-times European champions AC Milan scored a penalty at the end of extra-time before winning a 24-penalty shootout against Portugal's Rio Ave on Thursday to squeeze into the Europa League group stage.
Milan, unbeaten in all competitions since March 8, were trailing 2-1 until Rio Ave defender Toni Borekovic handled in the area and Hakan Calhanoglu made it 2-2 from the spot with the last kick of the match.
Both sides converted their first seven penalties in the shootout, missed their eighth and scored their ninth.
They then missed two in a row each, with the two goalkeepers Pawel Kieszek and Gianluigi Donnarumma among the culprits, before Simon Kjaer converted Milan's 12th attempt and Aderaln Santos's effort was stopped by Donnarumma as Milan won 9-8.
"It's a magical night, for us it would have been a shame not to get past this round," Milan coach Stefano Pioli said. "This victory gives us strength to keep working and winning."