Italian coach Carlo Ancelotti is in his first season at Real Madrid, having replaced Jose Mourinho.

Story highlights

Real Madrid struggles to 3-2 win over Spain's bottom team Rayo Vallecano

Carlo Ancelotti's team had to hang on nervously after leading by three goals

Win leaves third-placed Real six points behind La Liga champion Barcelona

Wednesday's opponent Juventus wins 1-0 at Parma in Italy's Serie A

CNN  — 

On one hand, Cristiano Ronaldo is still scoring goals for fun and Gareth Bale is starting to justify his mammoth transfer fee.

On the other, Real Madrid’s defensive game is appalling.

Carlo Ancelotti, who learned the game in a league where solidity at the back is everything, must be having kittens.

So would you if your team took a three-goal lead against the bottom team in La Liga, then proceeded to hang on nervously for a 3-2 win that so easily could’ve ended in misery.

Especially when your previous outing started similarly and ended in a 7-3 scoreline. And even more so when your next game is a trip to Juventus in the Champions League.

“A disaster,” Ancelotti called Saturday’s second-half display against city rival Rayo Vallecano, a team which had conceded 27 goals and scored just eight in 11 previous Spanish league matches.

Read: Sanchez scores winner in Barcelona derby

“Against Sevilla we were 3-0 up and let them back into the game. Today the same thing happened and that is not a coincidence,” the Italian told reporters.

“We need to change and remove the superficiality we have on the pitch, the second half was a disaster. You cannot let a team back into the game like that when you have the quality of Real Madrid.

“It is something that we have to talk about in the dressing room. It has happened twice that being in front has changed the attitude out on the field, and that is not good.”

Real had started so well, with Ronaldo waltzing down the left and firing in a low shot for a third-minute opener.

Rayo had a good penalty appeal turned down and a goal disallowed before Real’s marquee signing Bale laid on a perfect cross for Karim Benzema to head the second just after half an hour, having been set free by Xabi Alonso.

Read: ‘Lucky’ Bayern equals German record

Alonso, making his first start this season, was a major factor in Real’s first-half dominance but the Spain midfielder did not come back out after the break due to another fitness problem which puts him in doubt for Tuesday’s trip to Italy.

Nonetheless, Bale was again the provider as Ronaldo punished Rayo at the near post soon after the interval, putting the Portugal captain above Atletico Madrid’s Diego Costa in the Pichichi standings with his 13th league goal this season.

It was downhill from there for Real.

Vallecano won two penalties in quick succession – both converted by Jonathan Viera, one coming after Joaquin Larrivey hit the bar – while Diego Lopez did well to tip Alberto Bueno’s shot onto the post.

The result left third-placed Real six points behind Barcelona – which won 1-0 against Espanyol on Friday – and two behind Atletico, which hosts Athletic Bilbao on Sunday.

Real Sociedad moved up to seventh with a 5-0 drubbing of Osasuna, while Almeria climbed off the bottom on goal difference with a 1-0 win over Valladolid.

Read: Chelsea slip lets Arsenal go clear at top

Celta Vigo moved away from the bottom three with a 1-0 win at Sevilla – which had conceded seven against Real in midweek.

In Italy, Napoli and Juventus moved to within two points of Serie A leader Roma with respective victories on Saturday.

Second-placed Napoli, which hosts Marseille in the Champions League on Wednesday, beat Catania 2-1 with first-half goals from former Real Madrid forward Jose Callejon and Slovakian Marek Hamsik – putting both on six in the league this season.

Juve, which needs to beat Real to have any chance of a place in the knockout stage, triumphed 1-0 at Parma thanks to a 77th-minute strike from midfielder Paul Pogba.

Struggling AC Milan lost 2-0 at home to fourth-placed Fiorentina ahead of Wednesday’s trip to Barcelona in Europe’s top club competition, further progress in which may be the key to the future of under-pressure coach Massimiliano Allegri.

His Rossoneri hold the second qualifying place above Scottish side Celtic, but languish 11th in Serie A – 18 points behind pacesetting Roma, which will seek an unprecedented 11th successive win at Torino on Sunday.