Karim Benzema's two late goals - one a controversial penalty - downed Valladolid 2-0 on Friday to send Real Madrid a point above Barcelona at the top of La Liga.
It was Benzema's first match since a thigh injury ruled him out of France's World Cup squad on the eve of the tournament. The 35-year-old striker has since announced his retirement from international football.
The Ballon d'Or winner once again showed his worth to Real Madrid as the Spanish champions concluded a year in which they won both La Liga and the Champions League with another victory.
Real were awarded a penalty in the 83rd minute for handball by Javi Sanchez. The decision sent the home team into a frenzy and Leon was sent off for dissent. Benzema converted with ease.
The unmarked Benzema then doubled Real's lead in the 89th with a well-placed shot from inside the box after an assist from substitute Eduardo Camavinga.
There was a minute's silence before kick off for Brazilian great Pele, who died on Thursday aged 82, with the country's former striker Ronaldo paying his respects in the stands.
Both teams had several chances in the first half but superb goalkeeping from Valladolid's Jordi Masip and Real's Thibaut Courtois kept the game goalless at the break.
“Benzema played very well given that he had barely played in the last three months,” Courtois said. “Maybe he was lacking a bit of pace. I bet the Karim of last year would have scored even more goals, but it is good for him to get this double.”
"It was a great match for Courtois and Benzema, who scored again," added Real boss Ancelotti. "We ended an unforgettable year very well. We have to go little by little to put all the players in a good condition."
Masip denied Vinicius Jr a goal with a reflex save from an acute angle after 17 minutes, with Benzema sending the rebound high over the bar from close range.
Courtois then made a brilliant save after 36 minutes when Alvaro Aguado tried a shot from the edge of the box towards the top left-hand corner and the Belgian kept it out one-handed.
Courtois had to save Real again in the 68th when he kept out Sergio Leon's header again with one hand.
"It was a difficult match against an opponent who gradually entered the game," Ancelotti added. "We did well in the first half and we controlled the game. Valladolid played well and it was a competitive game. The team has not been solid, but in this difficult situation we came out with three points."
Real have 38 points ahead of second-placed Barca, who host Espanyol on Saturday.