Alejandro Arribas struck a second-half winner to earn Osasuna a potentially priceless 1-0 victory against Getafe and help their fight to avoid the drop.
Arribas netted 16 minutes from time as Osasuna ended a five-match winless streak with a deserved triumph that moves them four points above third-bottom Deportivo La Coruna, who lost 1-0 at Real Valladolid.
While the result could help save Osasuna's Primera Division status, it was a blow to Getafe's hopes of getting into Europe next season.
The visitors would have moved into the top seven with victory in Pamplona but they found themselves on the back foot almost from kick-off as Osasuna took the game to their opponents.
Emiliano Armenteros (twice), Marc Bertran and Francisco Silva all tried their luck for the hosts early on without finding the target but visiting goalkeeper Miguel Moya was called into action in the 22nd minute as he produced a brilliant save to keep out Miguel De las Cuevas' 20-yard shot.
Osasuna continued to pepper the Getafe goal with efforts, some more optimistic than others, and it was not until nearly half-time that the away side managed to mount a serious goal threat of their own, Angel Lafita heading Juan Valera's cross over.
It was a similar story after the break with Osasuna doing much of the pressing and they were unlucky not to go ahead in the 59th minute when Kike Sola's header hit the post.
Sola fired another opening wide before Moya produced another fantastic stop to keep out Nino's shot with 18 minutes to go.
Osasuna must have been starting to fear it was not going to be their night but, in the 74th minute, Arribas got on the end of Armenteros' deep inswinging corner to plant a header past Moya and clinch an invaluable triumph for the home side, who have a tough end to the season with their final three games coming against Granada, Sevilla and Real Madrid.