Samuel Chukwueze struck a dramatic decisive late goal as Villarreal secured a 2-1 aggregate victory that sent Bayern Munich crashing out of the Champions League.
The Nigeria international climbed off the bench to make it 1-1 on the night two minutes from time in the second leg at the Allianz Arena to send the Yellow Submarine through to their first semi-final since the 2005-06 season.
Robert Lewandowski had levelled the tie early in the second half with his 13th Champions League goal of the campaign.
But there was a dramatic twist, as Chukwueze ensured Unai Emery would not be prevented from progressing beyond the last eight of this competition for the first time in his managerial career.
Bayern, who had been eliminated in each of their past five Champions League knockout ties after losing the opening leg, quickly assumed dominance in possession as they looked to overturn the deficit.
But the Bundesliga leaders struggled to break down a disciplined Villarreal side and the Bavarian giants' only attempt on target in the first half came when Jamal Musiala headed straight at Geronimo Rulli from Leon Goretzka's cross.
Bayern maintained their pressure after the break, and they were rewarded when Lewandowski was on target in the 52nd minute; drilling home off the post after Dani Parejo conceded possession in a dangerous area.
Thomas Muller squandered a couple of decent opportunities to put Julian Nagelsman's side in front, the Germany international fireing over from Goretza's centre before heading a Leroy Sane cross wide.
Bayern were left to rue those misses in the closing stages, when the Europa League holders launched a devastating counter with Giovanni Lo Celso prodding the ball through for Gerard Moreno, who squared for Chukwueze to clinically tuck away.