Madrid (AFP) - Valencia lost to Arsenal in the Europa League semi-finals but hold pole position for La Liga's last Champions League spot as the race for the top four reaches its climax on Saturday.
Pierre-Emerick Aubameyang's hat-trick ended Valencia's hopes of qualifying by lifting a trophy and their chances looked slim in the league too, when they trailed Getafe by three points ahead of the penultimate weekend.
But a 3-1 win over Alaves, combined with Getafe losing away to a wounded Barcelona, means it is Valencia with their fate in their own hands, as they prepare to face Real Valladolid at Jose Zorrilla.
A superior head-to-head over Getafe means they need only match the result of Jose Bordelas' side, who host a Villarreal team sitting 14th and with little left to play for.
Yet Valladolid's position appears in Valencia's favour too. Victory away at Rayo Vallecano last weekend means their safety is already secured.
Win, and Valencia will be guaranteed Champions League football in consecutive seasons for the first time in seven years, a feat that not too long ago seemed almost unthinkable.
After five games, they were 15th and still to win. After 10, they were 14th, having won once and scored seven goals. After 15 games, they had won three but were back in 15th, ground to a halt by nine draws.
When Marcelino was appointed in 2017, he was the club's 12th coach in five years and only one of them -- Nuno Espirito Santo -- had overseen enough matches to make even one full league season.
Most waited for the trigger to click but Marcelino stayed and after 10 draws in 13 games, they won, coming from behind in the Copa del Rey to beat Segunda B side Ebro, who had a man sent off after 29 minutes.
"There was this click," said striker Kevin Gameiro in an interview with AFP this month. "And there was also a bit of luck."
Defeats by Girona, Juventus and Real Madrid tempered hopes of a recovery but in between came three victories in a row and after, five games unbeaten, including a Champions League win over Manchester United.
- Valencia surge -
Eighth in the table at the start of the year, Valencia then surged through March and April, 10 wins thrusting them within sight of the top four.
"The word surrender does not exist in my vocabulary," said Marcelino.
They stumbled again, twice, defeated last month by Atletico Madrid and Eibar, the resurgence almost evaporating in the space of four days.
But their rivals wobbled too as Getafe lost their nerve and Sevilla faded, the bounce from bringing in Joaquin Caparros to replace Pablo Machin proving short-lived.
Sevilla's decision to act has them lying sixth, needing to win at home to in-form Athletic Bilbao on Saturday and needing both Valencia and Getafe to lose.
Valencia's decision to persevere may be about to pay off, a top-four finish the perfect boost ahead of the Copa del Rey final on May 25 against Barcelona, who will be without Luis Suarez and perhaps goalkeeper Marc-Andre ter Stegen.
"The spirit of the team has merged with the spirit of Valencia, which is always: never give up," said striker Rodrigo earlier this month.
For Getafe, the Europa League would be a disappointment, even for a team who were promoted to the top flight only two years ago and whose annual wage bill is more than ten times less than Real Madrid, the club they hope to finish one place behind.
"Everything can still happen," said Bordalas.
Getafe have a chance, which is perhaps more than can be said for Girona, whose players and coach Eusebio Sacristan conceded their loss at home to Levante last weekend had been decisive in the fight against relegation.
"All that's left is to say sorry," said an emotional Eusebio afterwards. "I was convinced I could do it but I failed."
They are 18th, needing to make up three points and a six-goal deficit in goal difference to overtake Celta Vigo on the final day.
Celta have the added advantage of hosting already-relegated Rayo Vallecano while Girona play at Alaves.
Barcelona's title-winning campaign will end away at Eibar on Sunday just as Real Madrid's miserable season finishes at home to Real Betis.
Fixtures (times GMT)
Levante v Atletico Madrid (1100), Espanyol v Real Sociedad, Getafe v Villarreal, Sevilla v Athletic Bilbao, Real Valladolid v Valencia (1415), Alaves v Girona, Celta Vigo v Rayo Vallecano, Huesca v Leganes (1845)
Real Madrid v Real Betis (1000), Eibar v Barcelona (1415)