Valencia beat Real Madrid 2-1 on Wednesday and with fourth-placed Getafe not in action until Sunday, Marcelino's side knew they would move into the top four with victory at Rayo, who had lost eight of their last nine league games.
The visitors earned a penalty midway through the first half but their usually reliable captain Dani Parejo was thwarted from the spot by Rayo goalkeeper Alberto Garcia, and five minutes later top scorer Raul de Thomas put Rayo ahead from close range.
La Liga clubs can return to full training from Monday
30/05/2020 AT 12:31
Rayo had squandered the lead in their last two games but clung on to their advantage with the help of more impressive saves from keeper Garcia.
Midfielder Mario Suarez sealed their first league victory since January with a towering header from a corner in added time, giving coach Paco Jemez his first win in three games since re-taking charge of the club last month.
Rayo are still 19th in the standings although the victory took them on to 27 points after 31 games, three short of climbing out of the relegation zone.
Valencia remained in fifth place on 46 points, one behind Getafe who host Athletic Bilbao on Sunday.
Messi prefers not to over-think risk of infection as La Liga return looms
15/05/2020 AT 08:48
Barcelona in crisis as six directors quit
10/04/2020 AT 09:04