A second half strike from Luis Suarez pedalled Barcelona past Espanyol 1-0 on Wednesday night at the Camp Nou.
The result brings Barcelona to within a point of leaders Real Madrid in the table, with Los Blancos scheduled to face Alaves on Friday, while Espanyol are officially relegated to the second division.
It was far from the dominating performance seen in Barcelona's last outing against Villarreal, as Espanyol made sure it was a tough, contentious derby.
A wild second half sequence in which Ansu Fati and Pol Lozano were sent off within minutes of each other made for a slightly more open affair, with Barcelona taking advantage just enough to secure the three points.
Quique Setien made just one change from the starting XI that pasted Villarreal over the weekend, with Ivan Rakitic coming in for Arturo Vidal.
Otherwise, it was Lionel Messi, Suarez and Antoine Griezmann up top, with Sergi Roberto once again pulling the strings in midfield.
While Barcelona dominated the early proceedings, Espanyol were the ones with the first real scoring chance on a counter attack that ended with an Adrian Embarba shot being blocked by the leg of Barcelona goalkeeper Marc-Andre ter Stegen.
Barcelona started peppering Espanyol goalkeeper Diego Lopez with shots through Messi and Suarez, but otherwise it was tough going against their city rivals, who were not as inclined to give up space in midfield like Villarreal.
The Espanyol counter attack produced another gilt-edged chance minutes before half time, with Didac Vila glancing a shot off the post after the ball had pinballed off a couple players deep in the area.
Setien made his first change during the break, replacing Semedo with Fati, but just minutes after coming on the pitch the youngster was sent off for a studs-up challenge on Fernando Calero after referee Jose Luis Munuera Montero consulted with VAR, leaving Barcelona a man down.
The advantage for Espanyol lasted just a few moments, though, as almost immediately a studs-up tackle from Pol Lozano on Gerard Pique, who got everyone's attention pre-match by riding his bike to the Camp Nou, also resulted in a VAR-aided red card, making for 10 vs 10 football for the final 40 minutes.
Barcelona were happy to exploit the extra space on the pitch and they notched the game's lone goal minutes later when Griezmann back-heeled to Messi, whose shot was blocked, but Suarez was there to clean up and fire into goal for a 1-0 lead.
The second substitution for the hosts saw Griezmann make way for Vidal, but Barcelona were still struggling to find a second goal to make things less nervy.
The Espanyol attacking substitutions didn't help and Victor Campuzano almost nodded in a header which would have equalised.
Martin Braithwaite was next to be summoned off the bench, replacing Suarez, but it was Espanyol who had the look of scoring the next goal and there was some question as to whether a shot struck the arm of Vidal in the penalty area in stoppage time.
In the end, a spot kick was not awarded to the Pericos, as Barcelona emerged with the three points to stay within striking distance of the top spot.
Espanyol, meanwhile, must start preparing for LaLiga SmartBank.
1.- Barcelona: Ter Stegen; Semedo (Fati, min. 46), Pique, Lenglet, Jordi Alba; Busquets, Sergi Roberto, Rakitic (Araujo, min. 92); Messi, Suarez (Braithwaite, min. 82), Griezmann (Vidal, min. 71)
0.- Espanyol: Diego Lopez; Victor Garcia, Bernardo, Cabrera, Calero (Darder, min. 66), Didac; David Lopez, Marc Roca (Wu Lei, min. 86), Pol Lozano; Embarba (Campuzano, min. 74), Raul de Tomas
Goals: 1-0, min. 56: Suarez
Referee: Munuera Montero (Andalusian).
Yellow cards: Raul de Tomas (Min. 45+1) for Espanyol, Pol Lozano (Min. 52) for Espanyol
Red cards: Ansu Fati (Min. 49) for Barcelona, Pol Lozano (Min. 53) for Espanyol (David Lopez (Min. 94) for Espanyol
Stadium: Camp Nou