Rafinha has returned to his native Brazil with Flamengo after eight years at Bayern Munich.
The right-back, 33, has signed a two-year contract with the Rio de Janeiro-based club.
Rafinha won seven Bundesliga titles while at Bayern after joining from Genoa, as well as eight domestic cups and the 2013 Champions League.
He began his professional career with Brazilian side Coritiba before joining Schalke in 2005 and spending five years in Gelsenkirchen.
Flamengo announced the signing on their website, stating Rafinha would have his presentation at the club on June 24.
His first-team opportunities were limited with Bayern last season, leading to his departure after their domestic double triumph.
He was joined by veteran wingers Arjen Robben and Franck Ribery in bidding farewell to Bayern at the end of the campaign.
Estamos chegando!!! pic.twitter.com/PTpMCX5Pc4— Rafinha Official (@R13_official) June 10, 2019