Victor Valdes is set to return to Barcelona as the coach of the club's under-19 team, sources have told ESPN FC.
Barca president Josep Maria Bartomeu said last week that the club have been in talks with the former goalkeeper about returning to Camp Nou.
Valdes also has an offer to train Leganes' B team, which could provide a more immediate path to coaching in Spain's top flight, but sources have told ESPN FC he favours the job on offer at Barca.
Negotiations started a few weeks ago and, pending a final meeting in the coming days, everything is now in place for Valdes to return to the club he spent the majority of his playing career representing.
He will inherit a team that reached the semifinals of the UEFA Youth League last season and features United States youth international Konrad de la Fuente. They have also just signed 16-year-old England youth international Louie Barry from West Brom, as first reported by ESPN FC.
Valdes, now 37, left Barca in 2014 after making 535 appearances for the first team. Following spells with Manchester United, Standard Liege and Middlesbrough, he retired from football in 2017.
He has been coaching at Madrid-based ED Moratalaz since 2018 and recently completed his UEFA Pro licence alongside former teammate Xavi Hernandez.
Valdes will take over from Denis Silva and his appointment is expected to be the first in a number of changes below first team level this summer. Bartomeu is keen to restructure certain areas of the club before his mandate ends in 2021.