"Life goes in cycles, and mine at my beloved Liverpool FC has drawn to an end," he posted https://twitter.com/lfc18alberto/status/1145774803154100226 on his Twitter account.
"Thank you for making me a better footballer and, above all, a better person ... Finally, a very special thank you to the club's superb fans, who always supported me."
The defender is reported to be returning to Spain to play for Villarreal next season.
(Reporting by Arjun Panchadar in Bengaluru; Editing by Peter Rutherford)