FC Barcelona beat Getafe 2-1 in the Camp Nou Stadium after playing for 65 minutes with a player less.
Goals from Leo Messi and Xavi Hernandez gave Barcelona the win, while Roberto Soldado scored a late penalty for the visitors.
Barcelona ended with just nine players after defenders Gerard Pique and Rafael Marquez were sent off. Pique was sent off in the first half, while Marquez was shown a red card in virtually the last action of the game.
Barcelona coach Pep Guardiola welcomed midfielder Toure Yaya back into his starting line up following his return from the African Nations Cup.
Brazilian full back Maxwell started at right back for Barca after Dani Alves suffered a recurrence of his muscle problem while warming up shortly before kick off, meanwhile recent Getafe signing Miku was in his side's starting 11.
Barcelona got off to a perfect start when Leo Messi put them ahead with his 15th goal of the season after just six minutes.
The Getafe defense failed to clear a corner taken by Xavi and when the ball fell to the Argentinean on the edge of the penalty area, he curled a delightful shot into the back of the net.
The home side was flying and Messi had to more clear chances before the 20th minute. However, on both occasions he failed to beat the Getafe keeper Jordi Codina.
Those misses were to prove expensive as Barca was reduced to 10 men after 25 minutes when Pique was shown a direct red card for a flying foul on Getafe defender Rafa.
Pique probably went for the ball, but it was a wild challenge and the defender can have no complaints.
The sending off changed the game completely with Getafe finding more space to show that they too know how to move the ball sweetly about the pitch and Miku forced Barcelona keeper Victor Valdes into action on two occasions.
Nevertheless Zlatan Ibrahimovich should have made it 2-0 just before the break after beating the offside trap and rounding Codina only for his goal bound shot to be cleared off the line.
Maybe that miss helped make up Guardiola's mind for him, because after watching Valdes save from Roberto Soldado early in the second half, he replaced the striker with holding midfielder Sergio Busquets.
Rafael Marquez then replaced the injured Toure, before Seydou Keita missed another chance, by slicing wide from inside the area.
Barcelona was not to be denied however, and Xavi scored the second and decisive goal following a counterattack on 66 minutes.
It was set up by Messi, who pulled four defenders out of position before giving the midfielder a simple chance from close range.
The goal sealed Barcelona's win, but Getafe pulled a late goal back after Soldado scored from the penalty spot in the 92nd minute.
Marquez got tangled up with Getafe substitute Kepa and was also shown a red card, but although Barcelona ended with nine men, there was no time left for Getafe to make their advantage count.