San Sebastian-based Sociedad and Valencia, who won 1-0 at Getafe in the earlier kickoff, are tied on 62 points with two matches left, with the Basques ahead in the standings thanks to a superior head-to-head record.
Sixth-placed Malaga's hopes of returning to Europe's elite club competition are over as they are now eight points behind Sociedad and Valencia.
Sevilla midfielder Ivan Rakitic fired the Andalusian club ahead in the 10th minute at their Sanchez Pizjuan stadium but headed into his own net six minutes later.
In-form Sociedad forward Imanol Agirretxe volleyed what proved to be the winner in the 24th minute and Sevilla were unable to make some late pressure count.
Sociedad have played some of the most entertaining football in the league this season with a team of mostly home-grown talent directed by French coach Philippe Montanier.
Their final two matches are at home to Real Madrid next weekend and away at relegation-threatened Deportivo La Coruna the following week.
Valencia host Granada next weekend and then play at Sevilla, who are eighth on 47 points, five behind city rivals Real Betis in seventh.
Champions Barcelona, Real Madrid in second and third-placed Atletico Madrid have already made sure of their places in the Champions League group stage.
Granada, who narrowly avoided relegation last season, moved to the brink of safety when they won 3-0 at home to fellow strugglers Osasuna, while second-division leaders Elche won promotion to the top flight.
- Sports & Recreation
- Real Madrid