Athletic Bilbao staged a second-half comeback to sink Malaga 2-1 and close in on the top four in the Primera Division.
Juanmi put hosts Malaga in front in the 38th minute as their opponents struggled to get going.
But Athletic were much improved after the break, Mikel San Jose heading the equaliser in the 69th minute.
Malaga started to lose their discipline as they racked up the bookings and it told in the 83rd minute as Francisco Portillo collected his second and was sent off.
And Athletic got the winner two minutes later as Iker Muniain scored at the second attempt.
The win moved them a point behind fourth-placed Villarreal.
Both sides were struggling for inspiration in a slow start to the match before Malaga started to gain the upper hand after half an hour.
Juanmi and Vitorino Antunes both fired efforts wide from inside the area before the former broke the deadlock seven minutes before the break.
Marcos Angeleri nodded the ball back across goal from the right side and Juanmi sent his header high into the net from the centre of the area.
Athletic had a chance to level minutes later when San Jose headed over Ibai's free-kick from close range.
Ibai then fired over from the left side of the area as the visitors ended the half on the up.
And they continued to improve after the break, with Oscar De Marcos mis-hitting a shot wide of the left post from 18 yards.
The equaliser arrived in the 69th minute, San Jose heading Markel Susaeta's inswinging corner from the right low into the net.
De Marcos tested Willy Caballero with a shot from distance as Malaga continued to wobble.
Portillo picked up his second booking in less than 10 minutes for a foul on Ander Iturraspe, leaving the hosts to play the final seven minutes with 10 men.
And they could not hold out as Athletic grabbed the winner two minutes later.
Muniain's first shot was blocked by Caballero, but he was on hand to slot home the rebound to complete the comeback.