There are six Madrid players in Spain’s team for the World Cup.

Lopetegui’s name had not been mentioned by Spanish media among the probable candidates for the Madrid job, which opened up after Zidane unexpectedly quit. Last month, Lopetegui agreed to extend his contract with the national team through 2020.

“I admire and respect Lopetegui a lot. He is a top coach, and that made it harder to make this decision,” Rubiales said. “Winning is important, but above that, we need to know how things have to be handled.”

It was a difficult departure for the 51-year-old Lopetegui, who took over from Vicente del Bosque after the 2016 European Championship and had been credited with reviving a team that was on the decline after winning Euro 2008, the 2010 World Cup and Euro 2012.

By successfully blending talented youngsters and veterans from its golden generation, Lopetegui kept Spain unbeaten through 20 matches in charge, comfortably leading the team to the World Cup from a qualifying group that included Italy.

He won European championships with Spain’s under-19 and under-21 teams in the early 2010s, but had a lackluster stint with Portuguese team Porto in his only job with a major club.

Rubiales has already left his impression after taking over a federation which was in the hands of embattled official Angel Maria Villar for nearly three decades. He was elected president over Juan Luis Larrea, the federation’s former treasurer and its interim leader since Villar was suspended following his arrest last year on suspicion of corruption.

In one of his first actions, Rubiales canceled a previously arranged “vacation” trip by officials to the World Cup that would cost nearly 2 million euros ($2.3 million). He got the money reimbursed and spent only about 500,000 euros ($590,000) with new travel arrangements for sponsors and federation officials.

“We are all affected,” Rubiales said about Lopetegui’s departure. “We have to think about what is best for the entity, for the federation and the team, and from this afternoon we will all be together to go forward.”