The midfielder has fought his way back into the first team reckoning in recent months.
He declared: "I dedicate my life to defend the Real Madrid crest. I've worn this shirt for most of my life, training and playing with it most days. Real Madrid has been training me since I was a kid and has helped me become a better person and player.
"I will always be grateful to the club for bringing me up this way."