The Scotland international announced on Thursday that he will end his nine-year spell at Anfield when his contract ends this summer.