The La Liga side identified Lopetegui as the man to take the club forward as they begin a new project.
The former Spain boss has been offered an initial three-year contract untill 2022, a considerable salary and a release clause.
Lopetegui’s possession-based style of play has made him an attractive candidate for Monchi, with the Spanish coach favouring a fairly rigid 4-3-3 formation.
Lopetegui, 52, has been out of management since being sacked by Real Madrid in October 2018 after just 14 games in charge at the Santiago Bernabeu.
His appointment by Real came on the eve of the 2018 World Cup in Russia, where he was set to manage the Spanish national side.
The Spanish FA dismissed Lopetegui two days before Spain’s opening game against Portugal because his agreement to join Real Madrid was made without their knowledge.
The former Real Madrid and Barcelona goalkeeper has also coached Rayo Vallecano and Porto at club level.