Born in Switzerland to parents from Yugoslavia, Rakitić played for Switzerland at youth level, but decided to represent Croatia at senior level. He made his debut for Croatia in 2007 and has since represented the country at the UEFA Euro 2008, 2012 and 2016, and the 2014 and 2018 FIFA World Cup, reaching the final of the latter. He retired from international duty in September 2020, having made 106 appearances. At the time of his retirement, he was the fourth most capped player in the history of Croatia.