"Real Madrid C. F. and Luka Modric have reached an agreement to extend the player's contract until 30 June 2023," the club said in a statement on Wednesday.
A Real Madrid regular since 2012, Modric, 36, scored 31 goals in 436 appearances for the Spanish team. He also produced 73 assists for the Whites.
Before Real Madrid, Modric played for England's Tottenham Hotspur.
The Croatia captain helped Real Madrid win five UEFA Champions League, four FIFA Club World Cups, three Spanish La Liga titles, and three UEFA Super Cups.
He also claimed a Spanish Cup and four Spanish Super Cups with Real Madrid.
Modric is a FIFA World Cup silver medalist as the Croatian national team lost to France 4-2 in the 2018 final at Moscow's Luzhniki Stadium.
He has scored 21 goals in 150 international caps for his nation.