Raul Garcia struck a brilliant equaliser to keep Osasuna firmly in the hunt for a European place as they drew 1-1 with relegation-threatened Villarreal an invaluable victory at El Madrigal.
Villarreal looked set to move six points clear of the drop zone after taking a 44th-minute lead through Bruno Soriano but the hosts paid the price for failing to make the most of several opportunities when Garcia found the top corner with a stunning volley 18 minutes from time.
The result sees Osasuna join seventh-placed Atletico Madrid on 48 points and leaves Villarreal in the bottom four, four points above Sporting Gijon and the relegation zone.
After a goalless opening half-hour, Villarreal thought they had taken the lead when Marco Ruben flung himself at Juame Costa's low cross but his effort came back off the post.
Osasuna then immediately raced down the other end and struck the woodwork themselves when Javad Nekounam's 25-yard effort beat Diego Lopez but hit the bottom of the right-hand post.
With those efforts both staying out the first half looked set to finish goalless, but Villarreal snatched the lead on the stroke of half-time through Bruno.
Osasuna goalkeeper Andres Fernandez could only push Marcos Senna's low cross-shot back out into the danger area and Bruno coolly curled a left-footed finish into the top corner from 12 yards out.
Boosted by that goal, Villarreal started the second half well and should really have put the game beyond Osasuna.
Hernan Perez brought a good parry out of Fernandez in the 47th minute after racing from inside his own half, and then three minutes later Borja Valero missed an even better chance when he was denied by the Osasuna keeper after breaking clean through.
Senna then drilled a low shot just wide of the far post before Fernandez survived a let off when he spilled a high ball in the area, with Villarreal unable to turn the loose ball in.
The home fans must have feared the worst as their side failed to increase their lead when on top, and those fears were realised in the 72nd minute when Osasuna's leading scorer Garcia struck to earn his side a point.
Dejan Lekic laid the ball back to Garcia on the left edge of the area and the midfielder, after seeing the ball lift up in the air off his first touch, smashed an unstoppable volley into the far top corner with his second touch for his 10th goal of the season.