Real Sociedad clung on for a 1-0 LaLiga victory at Huesca despite finishing with nine men at Estadio El Alcoraz.
Mikel Merino fired Sociedad ahead after 64 minutes with his first goal for the club.
The former Newcastle midfielder latched onto an excellent Theo Hernandez pass before firing a low effort home from the edge of the box.
However, the visitors made life difficult for themselves in the closing stages.
Juanmi was booked 19 minutes from time for a late tackle and then immediately earned a second yellow card for dissent with his protests.
Hernandez was then sent off in the 82nd minute for slapping Damian Musto as the hosts were about to take a free-kick.
However, despite their numerical advantage Huesca failed to find an equaliser, with Geronimo Rulli denying Cucho from point-blank range in the closing stages.
The win – their second of the season – sees Sociedad climb to sixth, with Huesca 16th.