The signing of the deal, agreed and announced last night, was confirmed in a short statement on the club's website.
After months of uncertainty over the former Sevilla wing-back's future, he has signed a four-year deal which includes a €150 million buyout clause, which will go down in value by €25 million per season to be worth €50 million in the final year of the deal.
"Being at the club for so many years is a dream," he said.
"I'm playing at one of the world's most desired teams, which is making history. The most important thing is that I'm happy and I want to make the most of it.
"It is a privilege and a joy to be here."