Felipe Caicedo came off the bench to score twice for Espanyol as they beat 10-man Valencia 2-0 in the second leg of their Copa del Rey tie to record a 3-2 aggregate win.
It was Valencia who had claimed a 2-1 win in last week's first leg, but they were undone by two late goals at the Estadi Cornella-El Prat.
The visitors had the first chance on goal, when Rodrigo De Paul worked some room on the edge of the box before drilling in a low strike that was held by Pau Lopez.
However, Valencia soon found themselves down to 10 men after Shkodran Mustafi lost possession and ended up bringing down Lucas Vazquez just outside the box.
The German was adjudged to have been the last man and the referee didn't hesitate in showing him a straight red card.
From that moment the hosts took control of the match and Ruben Duarte forced Yoel Rodriguez to beat away his powerful strike.
They threatened again midway through the first half when Christian Stuani met Duarte's cross at the front post, but he ended up directing his header inches wide.
Espanyol continued to create the better chances and Alvarez fired over the bar, before Duarte saw his shot blocked on the line as the first half finished goalless.
After the break, the hosts remained well on top, but they had to wait until the 79th minute to make the breakthrough.
Caicedo was the man who found the net, as three minutes after coming off the bench he met Salva Sevilla's free kick and headed past Rodriguez.
The Ecuadorian grabbed his second of the match 10 minutes later when he was picked out inside the box by Vasquez, before drilling a low strike into the corner to seal his side's passage into the quarter-finals.