Zinedine Zidane has shocked the football world by resigning as Real Madrid coach just days after winning a third consecutive Champions League with the La Liga giants.

At a news conference scheduled on short notice Thursday, the 45-year-old confirmed he would step down following Saturday's 3-1 victory over Liverpool that made him the first coach to lift the European Cup three years in a row.

- Follow LIVE: Zidane quits Real Madrid

- Marcotti: Who could replace Zidane at Real Madrid?

- Marcotti: Why did Zidane leave Real Madrid?

- Wenger to Madrid 'the perfect marriage'

- Rating Zidane's final news conference

- Zidane: A change is needed at Real Madrid

"I am doing this for the good of this team, for this club," Zidane said. "It would have been difficult for me to win again next year. There have been good moments, but also difficult times. I do not forget that. And at this club, you must know this: I do not want to start a season and have a bad time. I want to end with Real Madrid when everything is going well. I did it as a player, and now again as a coach. This [is] the right moment to end things well."

Zidane said he no longer had a clear idea of how he could manage the team to more success next season, hence the decision to step aside and allow a change to be made.

"I had the respect of all, above all, the players, which has been fundamental in achieving things," he said. "The players have nothing to do with my decision. It is about what I think. After three years, it is difficult to keep coaching, above all, having won three Champions Leagues. And I did not see so clear that we would win again. If I have the feeling I will not win, a change must be made. As a player, if I was not happy as I was not winning, I left myself, did not blame other people, took a decision, and that's that."

Zidane admitted there were some difficult moments over the course of the 2017-18 campaign, mentioning the Copa del Rey defeat to Leganes, and he felt that after two and a half seasons together, he just could not ask any more from the Madrid players.

"There are difficult moments when you can wonder whether you are the right person still," he said. "I do not forget the hard times, as well as the good times, and that makes you reflect. And this is the right moment. The players need a change. I want to thank them too, as in the end they are the ones who fight on the pitch. This is a demanding club, not easy for them, with this great history. We always want more from the players, and a moment comes when I cannot ask them for more. They need another voice to return to winning again. If I do not see clearly that we are going to continue winning, a moment comes when you say, 'Better to step aside.'"

Zidane denied that his decision to leave was in any way linked to uncertainty over Cristiano Ronaldo's future at the club, and he avoided a question about what type of changes were needed within the squad ahead of next season.

"This is a squad which has shown its worth in these recent years," he said. "About what comes next, is not for me to say. I've had a good relationship with the president, and we've spoken about signing players, but that's not why I'm leaving."

Zinedine Zidane has won the Champions League for three successive seasons with Real Madrid. Photo by Stuart Franklin - UEFA/UEFA via Getty Images

Zidane suggested that leaving in this way would ensure his relationships with everyone at the club remained solid, and he could one day return.

"It is a difficult moment, as I am saying I am leaving, but it is not a sad day for me," Zidane said. "It is just an 'until soon.' I will always be close to this club. I know many people here, and that relationship will not change, not with the president either. I am not tired of coaching after three years. But it is the moment to [leave] now. I'm not going to manage another side now. I'm not looking for another team."

Club president Florentino Perez had opened the news conference by saying that he had been surprised when Zidane had told him the news on Wednesday, but had known better than to try to make him change his mind.

"It is a sad day, for me, for the club, the players, everyone at this club," Perez said. "It is an unexpected decision -- I loved him as a player and coach, and wanted him always at my side. But when he takes a decision, the only thing we can do is respect it. I would have liked to convince him, but I know how he is, so the only thing I can do is offer my respect and acknowledgement, and tell him he will always be welcome here at his home. This is 'until soon,' as I have no doubt that you will be back. Although if you need a rest, we understand that."

Zinedine Zidane has won the Champions League as a player and manager at Real Madrid. Photo credit should read GENYA SAVILOV/AFP/Getty Images

Zidane joined Real Madrid in January 2016 following a stint as Castilla's youth team coach, and he has finished each season since by lifting the Champions League trophy, while also clinching the 2016-17 La Liga title along with two Club World Cups, two UEFA Super Cups and one Spanish Super Cup.

Progress in the Champions League past major rivals Paris Saint-Germain, Juventus and Bayern Munich and then Saturday's win in Kiev -- which extended Madrid's record of European Cup triumphs to 13 -- had appeared to ensure he would continue in the job, and Perez had always backed him in public.

Cracks in his relationship with Perez had appeared during a midseason disagreement over whether to sign young Athletic Bilbao goalkeeper Kepa Arrizabalaga, while Zidane himself had always spoken about how he knew no Madrid coach was guaranteed the job long-term and that the summer was likely to bring some changes at the club.

Attention now turns to Zidane's successor, with two of the previous leading candidates -- Tottenham manager Mauricio Pochettino and Germany national team coach Joachim Low -- having recently signed new extensions to their current deals.

Zidane, a former Madrid star and France international, was one of the greatest players of his generation, winning trophies that included the 1998 World Cup, Euro 2000 and the 2002 Champions League, as well as the 1998 Ballon d'Or and FIFA World Player of the Year prize in 1998, 2000 and 2003.

Zidane's retirement as a Real Madrid player in 2006 also came as a surprise, when the then-33-year-old decided to hang up his boots in the aftermath of that year's World Cup final despite having another year on his club contract.