Duncan Ferguson had a late header disallowed as Everton crashed out of the Champions League despite a battling display against Villarreal.
With just nine minutes left Ferguson thought he had levelled the aggregate scores at 3-3, only for his header to be disallowed, seemingly for a foul by Marcus Bent.
Mikel Arteta had curled a 70th minute free-kick home after Phil Neville was tripped on the edge of the penalty area to give Everton hope but Diego Forlan's stoppage time goal ensured Villarreal won the third qualifying round second leg clash 2-1 to secure a 4-2 aggregate success.
The better side won as Villarreal, who finished third in La Liga last season, had the extra class in an entertaining clash between two sides who produced contrasting styles off football.
Marcos Antonio Senna fired a long-range effort wide in the 11th minute after a patient build-up by the hosts before Everton had a great chance to take the lead on the night.
Ferguson headed Neville's long throw on in the 17th minute, but Tim Cahill's header was straight at Mariano Barbosa.
It proved to be an expensive miss as the Spanish side took the lead three minutes later. Juan Pablo Sorin's shot deflected off David Weir, and although a wrong-footed Nigel Martyn got a foot to the ball, the Argentine's shot went in.
The goal deflated Everton and four minutes later Sorin set up Forlan whose fierce drive was deflected away for a corner by Martyn.
In the 36th minute Martyn was again called into the action when he was forced to parry Forlan's drive and the former Leeds United goalkeeper then made another good save to keep Juan Riquelme's free-kick out.
Villarreal started the second period on top and in the 51st minute Martyn was again called upon to beat out Forlan's powerful shot.
However, when Everton broke Simon Davies' clipped cross was headed wide by Ferguson who should really have scored.
Martyn then stretched to save Luciano Figueroa's deflected effort and Riquelme's drilled free-kick flew just over the crossbar.
Villarreal looked to be cruising to victory but, after Arteta's stunning free-kick, Everton won a succession of corners. As the hosts panicked the Yellow Submarines were forced to endure several goalmouth scrambles before booking their place in Thursday's draw for the group stages with a late second goal.
A quick break in stoppage time ended with the unmarked Forlan slotting his shot past the despairing dive of Martyn.