Manchester United have confirmed they have agreed a deal with Olympique Lyonnais for sale of their defender Rafael on 3 August.

The French club president Jean-Michel Aulas confirmed the 25-year-old had arrived in Lyon to undergo his medical. The Brazilian will sign a four-year contract and the deal could see the Red Devils cash in £2.1m ($3.3m), according to The Times.

Rafael has ended his eight-year spell at United and he follows his twin brother Fabio, who joined Cardiff City in January 2014 out of Old Trafford.

A statement on United's official website read: "French club Olympique Lyonnais have announced an agreement with Manchester United for the transfer of Brazilian right-back Rafael, who is set to sign a four-year contract at Stade de Gerland."

"The 25-year-old underwent a medical in Lyon today [3 August] and will be officially unveiled at a press conference this week."

Rafael took to social media to thank former United manager Sir Alex Ferguson and the Old Trafford faithful for supporting him during his time in England.

I want to thank Manchester United fans for all the love during those 8 years. Since I signed with the club I lived incredible moments, after all it was 8 years wearing the shirt of one of the biggest clubs of the world. Thank you Manchester United FC. I also want to thank all employees who always treated me with great affection and gave me greater attention. Thank you United Kingdom, I learned a lot in this country, as a player, and no doubt as a human being, lessons that I will keep for the rest of my life. Thank you Sir Alex Ferguson for always believing in my work and for all the doors that you opened up to me. Now it's a new path, a new challenge, God bless me! Quero agradecer aos torcedores do Manchester United por todo o carinho durante esses 8 anos. Desde que assinei com o clube vivi momentos incríveis, afinal de contas foram 8 anos vestindo a camisa de um dos maior clubes do mundo. Obrigado Manchester United FC. Também agradeço aos vários funcionários que sempre me trataram com muito carinho e dando a maior atenção do mundo. Obrigado Reino Unido, aprendi muito nesse país, como jogador, e sem dúvidas como ser humano, aprendizado que vou levar para toda vida. Obrigado Sir Alex Ferguson por sempre ter acreditado no meu trabalho e por todas as portas que me abriu. Agora é um novo caminho, um novo desafio, que Deus me abençoe!

A photo posted by Rafael Da Silva (@orafa2) on

"I also want to thank all employees who always treated me with great affection and gave me greater attention. Thank you United Kingdom, I learned a lot in this country, as a player, and no doubt as a human being, lessons that I will keep for the rest of my life.

"Thank you Sir Alex Ferguson for always believing in my work and for all the doors that you opened up to me. Now it's a new path, a new challenge, God bless me!"

Louis van Gaal has already signed a player in the right-back position. United secured the services of Matteo Darmian from Torino earlier this summer. The Italian international will vie with Antonio Valencia for the right-back position in the 2015/16 season.