After stepping away from the franchise to address his mental health, guard Ricky Rubio and the Cleveland Cavaliers have agreed on a contract buyout — likely marking the end of Rubio’s accomplished 12-year NBA career, sources told ESPN Thursday.

The buyout — which has $6.1 million left on this year’s contract and $6.4 million for 2024-2025 — gives the Cavaliers some financial relief and opens up a second spot on the team’s roster.

If Rubio continues his professional career, it will likely be where it started as a 14-year old prodigy — his native Spain.

Rubio missed most of the past two seasons recovering from a torn ACL — the second of his career. Rubio played 33 games a year ago, joining the team at midseason and averaging 5.2 points and 3.5 assists.