Italian striker Giuseppe Rossi scored his 18th league goal of the season as Villarreal put their mid-week Europa League disappointment behind them with a 2-1 win over Getafe at El Madrigal on Sunday.
Rossi scored a 74th-minute winner that keeps alive Villarreal's hopes of finishing third by moving the club to within three points of third-placed Valencia, who travel to Osasuna later on Sunday.
Villarreal arrived on the back of a 5-1 drubbing by FC Porto in the first leg of their Europa League semi final and fell behind to a Pedro Rios goal on 31 minutes.
However, Ruben Cani equalised for the hosts on the hour mark with a fine strike after a quick pass from Santi Cazorla.
Former Manchester United man Rossi then put Villarreal ahead, heading in Marco Ruben's centre for his 18th goal of a stellar campaign.
Getafe, recently taken over by Dubai's Royal Emirates Group, finished a best-ever sixth last season but now lie just two points above the relegation zone with four games left.
Elsewhere, Brazilian midfielder Renato scored a second-half winner as Sevilla moved back up to fifth with a 1-0 win at 10-man Almeria.
The substitute struck on 57 minutes to down strugglers Almeria and help Sevilla enhance their European hopes, moving above Atletico Madrid courtesy of their superior head-to-head record.
Almeria reached the semi-finals of the King's Cup for the first time in their history this season, but prop up the table and the Sevilla defeat leaves them on the brink of relegation, 11 points from safety with four games left.
The game hinged on the dismissal of Almeria's Danish full-back Michael Jakobsen for a crude challenge on Martin Caceres in the 52nd minute and the Uruguayan defender was stretchered off injured.
Five minutes later Renato headed in the opening goal for Sevilla, who held on despite a late fightback from the hosts.
Malaga took a giant stride towards safety with a 3-1 home win over 10-man relegation rivals Hercules.
Malaga came from behind to record a third straight victory and move four points clear of the relegation zone, while Hercules stay second from bottom, four points from safety.
Paraguayan striker Nelson Valdes headed Hercules into a third-minute lead, but Malaga responded with Brazilian Julio Baptista equalising 60 seconds later.
Jose Rondon put Malaga ahead on 72 minutes before former Real Madrid man Baptista grabbed his second to wrap up the points.
Racing Santander moved five points clear of the drop zone with a 2-0 home win over Real Mallorca thanks to first half-goals from Markus Rosenberg and Kennedy Bakircioglu.
Barcelona and Real Madrid, set to face each other in Tuesday's Champions League semi-= final second leg at Camp Nou, both fell to surprise defeats on Saturday.
After going nine years without losing a league home match, Real coach Jose Mourinho watched his side lose their second inside a month as Zaragoza triumphed 3-2 at the Santiago Bernabeu.
Barcelona could have moved to within touching distance of the title with victory at Real Sociedad, but fell to a 2-1 loss as their 32-game unbeaten league run came to an end.
Barcelona, eight points ahead of Madrid, need four points from their remaining four games to secure a third successive league title.
"There's just four more points needed and we will go and try to get them wherever we can," said Barcelona coach Pep Guardiola.
"We will have to win them - we've talked about that."