VITORIA, Spain — Dani Ceballos scored twice in his first start for Real Madrid and helped it earn a much-needed 2-1 win at Alaves in the Spanish league on Saturday.

The win came three days after Madrid lost at home to Real Betis 1-0. This was only Madrid's third win in six rounds.

Ceballos struck in the 10th minute and restored the defending champions' advantage two minutes before halftime.

The winless Alaves almost levelled late when substitute Alfonso Pedraza twice hit the woodwork.

"I am happy for (Ceballos). He played very well, and besides the two goals he helped us a lot," coach Zinedine Zidane said. "He showed that he has a place on this team."

Ceballos received a pass from Marco Asensio, fought through a tackle, and shot just inside the post for the opener.

Manu Garcia responded by ending Alaves' long scoring drought. His powerful header from a cross by Munir El Haddadi was the Basque Country club's first goal of the season.

But Ceballos put Madrid back in charge when he fired in a ball that goalkeeper Fernando Pacheco spilled when he collided with a teammate while defending a cross.

Cristiano Ronaldo hit the goal-frame twice in the second half as the Madrid forward seeks his first goal in the league after he was suspended for the first four rounds for pushing a referee.

With Toni Kroos injured, Ceballos took the place of regular starter Luka Modric, who Zidane rested ahead of the trip to Borussia Dortmund in the Champions League on Tuesday.

Ceballos caught Madrid's eye in the off-season after he was named the best player at the Under-21 European Championship, where he helped Spain reach the final before losing to Germany 1-0.

Madrid reportedly paid Betis 16.5 million euros ($19.7 million) for the up-and-coming midfielder.

Madrid was also without the injured Karim Benzema and Marcelo, while Gareth Bale was left on the bench.

Alaves remained in the relegation zone after a sixth loss in as many games.