Dani Alves is returning to Barcelona as a free agent to reunite with new head coach Xavi.
Alves, who won 23 major honours over an eight-year spell at the Nou Camp with Xavi, will join up with his new team-mates after the international break but will not be able to play until January.
The 38-year-old Brazil international has not had a team since he left Sao Paulo in September after a dispute over unpaid wages.
The defender will bring a wealth of experience to Xavi's youthful squad, having won a record 46 trophies in his career.
A club statement read: "FC Barcelona and Dani Alves have reached an agreement in principle for the player to join the football first team for the remainder of the current season.
"The Brazilian will be joining training from next week but will not be able to play until January.
"The club will announce the full details at his official presentation as a new FC Barcelona player."
Alves initially joined Barcelona in 2008 from Sevilla to form part of Pep Guardiola's record-breaking team who won the treble in his first season in charge of the club.
But he left in 2016 to join Italian side Juventus, before having spells with Paris Saint-Germain and Sao Paulo.