An own goal by keeper Diego Alves gave Real Zaragoza a 1-0 win over Almeria on Monday which moved them out of the relegation zone but left their opponents firmly rooted to the foot of La Liga.
Both teams went into the game on the back of poor runs but the situation was more worrying for bottom side Almeria who had lost their last four games.
Zaragoza were creating the better openings but in-form keeper Alves was blocking everything that came at him.
Braulio Rodriguez and Ander Herrera had several good chances saved by the Brazilian shot stopper.
Angel Lafita then shot weakly with just the keeper to beat and Nicolas Bertolo was denied by the post.
Eventually Zaragoza found the back of the net in the 70th minute but it was thanks to a dose of misfortune that Alves did not deserve.
A Gabi Fernandez shot came back off the woodwork and hit the shoulder of the keeper before going in.
Almeria almost equalised but Carlos Garcia hit the post and the result means they are now 10 points from safety with five games to go.
"It was a typical match between two teams which were fighting for their future. We struggled more than we should have done and strangely enough after we scored was when we suffered most," said Zaragoza coach Javier Aguirre.
Almeria coach Roberto Olabe admitted that his team just had to keep going.
"We have to be professional, honest and be loyal to those who have believed in us," he said.
"In the first few minutes of the game we were alright but our own desire and the pressure ended up working against us. We didn't take our time and rushed things."
Barcelona and Real Madrid are fully focused on their Champions League semi-final after both sides won at the weekend to maintain the Catalan side's eight-point lead at the top of the table.
David Villa got the opener for Barcelona against Osasuna to end an eleven-match goal drought while Lionel Messi became the first player to hit 50 goals in a Spanish season when he scored the other in a 2-0 win.
Real warmed up for Wednesday's clasico with a 6-3 thrashing of Valencia.
Gonzalo Higuain will be looking to force his way into the side after he bagged a hat-trick while Kaka also scored twice and Karim Benzema got the other.