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.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', 'ae9bda22-0a21-4f37-9e19-c61ec317d9f8');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Nine-man Real Sociedad cling on for victory over Huesca'});