A 3-0 away win on the night was enough to secure Manuel Llorente's side a tie against Barcelona.
The visitors made the breakthrough in the 25th minute when Aritz Aduriz was found six yards from goal before slotting in.
Their lead was doubled five minutes later as Pablo Piatti calmly converted after he broke the offside trap.
Oscar Serrano should have been sent off before the break, but he was only shown a yellow card for his late tackle on Jordi Alba.
In an ill-tempered display from the home side, Serrano was finally given his marching orders in the 72nd minute when he picked up his second yellow card for a clumsy tackle.