MADRID, April 30 (Reuters) - Valencia prevented Barcelona from wrapping up the Primera Liga title for a second week in a row when they claimed a comfortable 3-0 win over relegation-threatened Alaves at the Mestalla on Sunday.
The victory allowed Valencia to close the gap on the leaders to eight points with three matches left to play, but Barca, who have a game in hand, will retain the title if they win away at high-flying Celta Vigo on Wednesday.
Barcelona, who beat struggling Cadiz 1-0 at the Nou Camp on Saturday thanks to a powerful shot from Ronaldinho, lead the table on 76 points from 34 games. Valencia follow on 68 from 35.
Real Madrid remain two points further behind in third after a fractious 1-0 win at Osasuna who are now four points adrift of their rivals in fourth.
Malaga became the first team to drop out of the top flight after an agonising 3-2 defeat at home to Racing Santander left them 10 points adrift of safety with just three games to play.
Midfielder Ruben Baraja gave Valencia the lead against Alaves when he controlled a Pablo Aimar pass with his chest and then coolly jabbed the ball under keeper Franco Costanzo midway through the first half.
Aimar, back in action just over two weeks after being admitted to hospital with viral meningitis, added a second nine minutes later when he stabbed in from close range after good work by Italian defender Emiliano Moretti.
Leading striker David Villa made it 3-0, and took his tally for the season to 23 goals, five minutes into the second half when he netted from the penalty spot.
The game between Osasuna and Real was high on effort and tension, but there was little fluent attacking play and scoring chances were at a premium.
The deadlock was broken six minutes into the second half when Real striker Julio Baptista fired high into the net from the penalty spot after he was adjudged to have been pushed as he ran into the area.
The Navarrans responded well and had the chance to level the match 12 minutes later when they were awarded a penalty after former Osasuna player Pablo Garcia pushed Pierre Webo, but Iker Casillas produced a great save to stop Patxi Punal's spot kick.
The Real keeper was sent off after he was booked for a second time nine minutes from time, but although his side were imprisoned in their own area for the remainder of the match they hung on for a vital win.
Malaga slipped out of the Primera Liga as they went down 3-2 at home to fellow strugglers Racing in controversial fashion.
The Andalucians had fought back from a goal down thanks to two quick-fire goals from Alexis, but the defender turned from hero to villain when his hesitation allowed Racing striker Antonito to make it 2-2.
Malaga's fate was sealed when Juanjo netted a follow-up after Francesc Arnau had saved an Antonito penalty, awarded when the referee decided defender Fernando Sanz had handled as he lost his footing and fell on the ball in the area.
Malaga's relegation means that their reserve team, who are bottom of the second division, will also be relegated as Spanish Federation rules do not allow two teams from the same club to play in the same category.