Real newly-appointed chairman Florentino Perez made his first big decision by snubbing Juande Ramos, whose six-month deal with the capital side ran out of late, and reaching an agreement with Pellegrini.
The 55-year-old tactician, who has just ended his Villarreal tenure, is going to take charge at the Bernabeu for €4 million, and the deal is expected to be officially announced on Tuesday.
"It is logical that between two clubs that maintain good relations that a deal was going to be closed," Llaneza was quoted as saying by AS.
"I can state that a provisional agreement has been reached between two clubs that are friendly and even more now that they have a new president.
"It is, of course, a blow to Villarreal and is a difficult and complicated time for us, but now we will start working on our task of finding a new coach."
Real suffered a succession of bad results under the management of Bernd Schuster early in the recently-ended season.
When Ramos took over, he couldn't make much of an impact and Los Merengues finished the season empty-handed.