Youth team striker Rodri scored a dramatic injury-time winner to give Sevilla a 3-2 victory at Almeria on Saturday to secure fourth place and La Liga's last Champions League qualification berth.
It was a crushing blow for Real Mallorca who had their hopes dashed as they waited on the pitch at their Ono Estadi to hear the result, having beaten Espanyol 2-0 minutes earlier.
Sevilla finished the campaign on 63 points to reach the Champions League preliminary round. Mallorca ended up fifth on 62 points to go into next season's Europa League.
Mallorca will be joined by Getafe who are sixth after a 3-0 win at Atletico Madrid.
The title will be decided on Sunday when leaders Barcelona, on 96 points, host Real Valladolid and chasing Real Madrid (95) visit Malaga.
Sevilla and Mallorca fans were glued to their radios as events unfolded on Saturday.
Frederic Kanoute nodded Sevilla in front only for Fernando Soriano to level before halftime for Almeria.
Victor fired Mallorca ahead after 23 minutes but their joy was short lived as Almeria's Chico diverted the ball into his own net to put Sevilla 2-1 up early in the second half.
The drama cranked up when Sevilla had Alvaro Negredo sent off and then Mario Suarez netted Mallorca's second in the 78th minute.
A minute later Juanma Ortiz curled in a stunning equaliser for Almeria, prompting Sevilla to pile forward in search of a winner.
Spain winger Jesus Navas then supplied a cross deep into injury time and, when the ball was nodded goalwards, Rodri acrobatically twisted in mid-air to volley the ball into the roof of the net.
Sevilla's staff and players, and some fans, sprinted on to the pitch to celebrate and there were a few confrontations before order was restored and the game was able to finish.
Earlier, two goals from Roberto Soldado helped Getafe to a 3-0 victory at the Calderon.
Atletico showed off the Europa League trophy to their fans before kick off, having beaten Fulham 2-1 in the final on Wednesday, and Getafe made the most of the relaxed, festive atmosphere.
Facing a weakened side who seemed more interested in next week's King's Cup final against Sevilla, Soldado rattled in two goals to take his tally for the season to 16 before Dani Parejo raced away to net a third at the end.
Zaragoza stormed into a 3-0 lead at home to Villarreal, each goal being cheered by the Getafe fans at the Calderon.
However, Spain winger Santi Cazorla scored twice and Giuseppe Rossi grabbed the equaliser as seventh-placed Villarreal fought back for a 3-3 draw.