Zinedine Zidane says he is stepping down as Real Madrid boss, five days after leading them to a third straight Champions League triumph, claiming the club needs "a different voice".
Zidane told a news conference that "everything changes" and "that's why I took this decision".
He leaves having guided the Spanish club to three successive Champions League titles and one La Liga success since taking over in January 2016.
"I love this club," he added.
"What I think is that this team needs to continue winning but I think it needs a change, a different voice, another methodology.
- Zidane leaves Real: What next for Champions League winners?
- Listen to the latest Euro Leagues Football Show podcast
- Champions League: Is anyone close to matching Real?
"This is the right moment for all involved - for me, for the squad, for the club."
Zidane, 45, took over after Rafael Benitez was sacked and was in charge for 149 games. He steered Real to 104 wins and 29 draws, had a 69.8% win rate, and won nine trophies.
However, Real finished third in La Liga in 2017-18 - 17 points behind champions and fierce rivals Barcelona - while they were knocked out of the Copa del Rey at the quarter-final stage by Leganes.
Zidane said in February he would walk away if he felt "there is nothing more to give".
However, the timing of his announcement still came as a shock, just days after Real beat Liverpool 3-1 in the Champions League final.
That win saw him join Bob Paisley (three at Liverpool) and Carlo Ancelotti (AC Milan two, Real Madrid one) as the only managers to have won the Champions League/European Cup three times.
"I had to do this for everyone," added Zidane on Thursday.
Real are looking for their fourth manager in five years.
Tottenham boss Mauricio Pochettino has been linked with Real in the past. The Argentine signed a new five-year contract at Spurs last week.
Juventus boss Massimiliano Allegri could also come into the frame, while Arsene Wenger wants to carry on in management after leaving Arsenal after 22 years in charge.
Italian Maurizio Sarri, most recently of Napoli, is also available.
The decision on who will next manage Real will be made by club president Florentino Perez.
He accompanied Zidane at the news conference and said he wanted to keep the France 1998 World Cup winner.
"This was a totally unexpected decision. Zidane informed me of his choice yesterday," added Perez.
"This is a sad day for me, for the players and for everyone involved with the club. He knows that I wanted to sign him more than anyone as a player, as well as a coach.
"I would love for him to be by my side forever."
Zindane's exit comes after Gareth Bale and Cristiano Ronaldo revealed they were contemplating their futures at the club.
Asked if his decision was anything to do with Ronaldo, Zidane said: "No."
Who do Real turn to next?
"It's not easy to find a coach for Real," the club's former president Ramon Calderon told BBC World Service.
"There are some in the market. Wenger has been offered that job many times. I know this president likes him and he was trying to offer him all the power of the club a few years ago.
"Pochettino is a good coach, no doubt he could be one of the candidates. I think Conte is free too, I don't know.
"The president will have to talk to the big players in the dressing room - Cristiano, Sergio Ramos, Marcelo. They will give their opinion too."
'Real's transition under Zidane immeasurable'
Hibernian manager Neil Lennon said Zidane "is up there with the greatest managers of all time".
"Zidane's record is amazing," he added. "We thought at the time that winning back-to-back Champions Leagues was an incredible feat.
"But to do it three times in a row - we may never see that again.
"Real Madrid's transition under Zidane has been immeasurable. In the big games he has come up trumps and he has that respect from being a great player."