Felipe Caicedo came off the bench to earn Espanyol a 3-2 aggregate win over Valencia in the Copa del Rey on Tuesday.
Valencia had claimed a 2-1 victory in the first leg of the last-16 clash at the Mestalla last week, but were unable to hang on to their advantage as Espanyol won 2-0 at Estadi Cornella El Prat.
The visitors' chances took a blow when Shkodran Mustafi saw red in the 14th minute for bringing down Sergio Garcia who was clean through on goal.
However, it took until the 79th minute for Espanyol to take advantage of the extra man, with substitute Caicedo meeting a looping free-kick to net an effort that would have been sufficient to send his side through on away goals.
The Ecuadorian forward was not finished there, though, and made absolutely sure of Espanyol's progression 10 minutes later when he drilled home from close range after receiving the ball from a Lucas Vazquez cross.
Espanyol will now face the winner of Wednesday's clash between Granada and Sevilla - a match the latter lead 2-1 from the first leg.
In Tuesday's other last-16 fixture, Levante left it too late to try to claw their way back into a 4-2 aggregate defeat to Malaga.
Malaga had won the first leg 2-0 and first-half goals from Ricardo Horta and Recio appeared to cement their place in the quarter-finals.
However, the introduction of David Barral shortly after the hour mark signalled a Malaga revival, with the 31-year-old netting twice in the 71st and 74th minutes to give visitors a slither of hope.
Captain Juanfran netted five minutes from the end to preserve that optimism, but Levante's admirable fightback ultimately fell two goals short, with Barral's eventful outing ending with a red card for a second bookable offence in the closing stages.