Karim Benzema struck twice and Cristiano Ronaldo scored with a controversial penalty as the capital club beat their lively city rivals to move two points clear of the Catalans
Madrid broke the deadlock in the 13th minute when Mesut Ozil picked up the ball in midfield and drove forwards before trading a one-two with Fabio Coentrao and then sliding the ball into the feet of Karim Benzema just inside the box, and the Frenchman quickly shifted his feet before drilling the ball into the top right corner.
The home side had a host of chances to extend their lead in the first half but each was squandered. Fabio Coentrao came closest, firing just wide after dinking a shot over Miguel Angel Moya from a tight angle. The Getafe goalkeeper also kept his side in the match in the first 45 minutes, saving a powerful header from Ronaldo.
The visitors silenced the vibrant Bernabeu crowd in the 38th minute when Tsepo Masilela dribbled down the left and played a pass into Medhi Lacen just outside the box. The midfielder managed to squeeze a pass through the Madrid defence to Miku, who remained onside to emphatically smash the ball into the bottom left corner and level the scores at 1-1.
Jose Mourinho's men then grabbed a slightly controversial second goal in the 58th minute when Daniel 'Cata' Diaz was adjudged to have fouled Ronaldo in the Getafe box, even though the incident happened outside the area and the Portuguese looked to have made the most of the challenge as well. Ronaldo, nevertheless, converted the spot-kick to make it 2-1.
Benzema then got his second goal of the game in the 69th minute after latching on to a sensational pass between Moya and the Getafe defence from Ronaldo to calmly slide the ball home.
Getafe snatched a lifeline three minutes later when Miku took advantage of some pinball football in the Real Madrid defence to tuck the ball in the bottom right corner.
But Gonzalo Higuain put the game beyond doubt in the 88th minute when he slid the ball into the bottom corner from the edge of the box.
This result sees Real Madrid go top of La Liga and create a two-point gap between themselves and champions Barcelona, who could only draw 2-2 at Real Sociedad.
Getafe, meanwhile, lie in 13th place.