Athletic Bilbao took a giant step towards sealing their Primera Division status after overcoming nine-man Real Mallorca 2-1 at San Mames.
Aritz Aduriz gave the hosts an early lead but then missed a penalty after Andreu Fontas was sent off on 25 minutes.
Fernando Llorente doubled the advantage late in the second half but Mallorca forward Giovani Dos Santos made for an exciting finish by netting a superb goal two minutes later.
However, Mallorca's hopes of snatching a late equaliser were struck a blow in injury time when Ximo Navarro was also sent off for a second booking and Athletic were able to hold on.
The Basque side, one of only three clubs never to have been out of the top flight in Spain, temporarily moved above Real Valladolid into 13th place in the table after the win, while time is running out for Mallorca, who remain bottom and at least four points from safety with just three games left.
Aduriz put Athletic in front after just seven minutes, heading home a Jon Aurtenetxe cross from the left wing, the full-back intercepting the ball from Mallorca midfielder Fernando Tissone.
Gregorio Manzano's visitors then made things harder for themselves when Fontas handled in the area midway through the first half, conceding a penalty and picking up his second yellow card. However, Mallorca goalkeeper Dudu Aouate stopped Aduriz's spot-kick.
The Islanders did not retreat after losing Fontas, and had a chance to level after half an hour, but home goalkeeper Gorka Iraizoz denied Victor Casadesus.
Athletic had a goal disallowed just after the re-start but Mallorca kept on pressing for an equaliser. Tomer Hemed tried to lob Iraizoz, but his shot went wide.
Llorente replaced Aduriz on 55 minutes and needed two attempts on goal before he added the second with 11 minutes left, volleying a cross by Markel Susaeta in from the six-yard box.
Giovani gave the visitors faint hope by scoring a brilliant free-kick, and the Mexican was inches away from equalising from another dead ball situation just two minutes later.
Mallorca's chances began to dry up as the clock ran down and were dealt a further blow in injury time when Navarro got his second yellow card for a foul on Susaeta.