Former Barcelona captain Carles Puyol has retired from the game and will take up a new role at Camp Nou next season, the Catalan club announced on Friday.
Puyol played 593 official first-team games for Barca between 1998 and this year, but had already announced his decision to leave the club this summer following several seasons blighted by knee problems.
The former Spain defender, who is 36, had been considering a move to a smaller side to extend his playing days, but has instead opted to take up a new post at Barca alongside sporting director Andoni Zubizarreta.
"I want to say thank you to FC Barcelona for everything they have given me and also for this new opportunity," Puyol said in a statement on the club's official website.
"I have always played football and I tried to do that as well as possible. I will do the same here," he added. "I need some time to rest and some more treatment on my knee, but I'm really excited by this new chapter."
Puyol will work with Zubizarreta, who is hoping to sign several players for the Catalan club this summer, including a replacement for the popular defender.
"Puyol joins us in the football area and we will try to take advantage and learn from all his experience," Zubizarreta explained. "He'll be an assistant on the sporting side and he'll work with me in all of the club's projects - both internal and external.
"He'll be close to all of the teams, it's a unique opportunity. For a couple of years we have been talking about what is best for him and I'm sure he'll soon see what it is that he likes doing the most."