The 29-year-old joined in 2007, making nearly 300 appearances as Real have maintained their status as one of the most successful clubs in world football.
Now 29 and the club vice-captain, Marcelo has won three Champions League titles, four Ligas, three European Super Cups, three Spanish Super Cups, two Copas del Rey and two Club World Cups during his career in the Spanish capital.
Real Madrid defender Marcelo has extended his contract until 2022, the Spanish football club announced Wednesday.
In the referee's match report, Alejandro Hernández Hernández noted that: "In the 89 minute, [Real Madrid] player number 12, Vieira Da Silva Junior, Marcelo, was sent off for kicking an opponent in the back with the ball at a distance where it could not be played".
If Marcelo sees out the full length of his new deal he will have spent 16 seasons at Real Madrid after joining from Fluminense at the age of 18 on November 9, 2006.
Real Madrid left-back Marcelo will miss the coming La Liga games against Real Sociedad (17 September) and Real Betis (20 September) after being handed a two-game ban for his dismissal during the weekend's 1-1 draw with Levante.
It begins its attempt to win a third UEFA Champions League in a row against APOEL in Group H.