Real Madrid president Florentino Perez has accepted Jose Antonio Camacho's resignation as coach.
Camacho stepped down after a poor start to the season
Perez has appointed his deputy Mariano Garcia Remon as the new coach.
Camacho only took over in May for his second spell in charge but Real have had a poor start to the season, losing 1-0 to Espanyol on Saturday.
"The Madrid board has decided to accept the resignation of Camacho, but he will continue his link with our club in the sports area," Perez said.
Camacho, who accompanied Perez as the announcement was made, added: "This year, the president, the board and the fans believed in me.
"But I can only admit that the team has not performed as they should have and they are not going to improve with me staying. By staying the crisis could have got worse, so I decided to go."
England captain David Beckham insisted that there was no rift between the coach and his players.
"The relationship between the squad and Camacho was very good, and I'm sure none of the players had any problem with him," he said.
"I didn't know him as well as some of the other players or the fans, but he was always nice to me and was a good coach.
"It's a shame he's gone but ultimately it was his decision - now I have to win the confidence of the new coach."
The 49-year-old Camacho took over from Carlos Queiroz who was fired after the nine-times European champions could only reach the last eight of the Champions League last season and finished fourth in La Liga.
Camacho was a stalwart with Real as a player, making more than 400 appearances between 1973-89 and winning nine Spanish league titles, three Spanish Cups and two Uefa Cups.
He won 81 caps for Spain and played in the 1982 and 1986 World Cups.
But he has overseen a dreadful start to the season, including last Wednesday's Champions League 3-0 drubbing at Bayer Leverkusen.
His resignation ends his second stint as coach at Real, where he lasted just three weeks in the summer of 1998 before also walking out - that time over a disagreement with former chairman Lorenzo Sanz.
Camacho then went on to coach the Spanish national side for four years, after which he returned to the Bernabeu via a short stint with Portugal's Benfica.
Remon, who said he had only accepted the job at the request of Camacho, said: "This is a sad day for Real."