However, Alex Teixeira pulled one back from the penalty spot for Shakhtar, before Dentinho headed in a second.

Teixeira’s low finish set up a tense finish, but Real held on.

The goals were the first Rafael Benitez’s side had conceded in this season’s Champions League and took the shine off what had looked like being a good response to the 4-0 defeat by Barcelona at the weekend.

Gareth Bale was one of only four players who remained from the team that lost El Clasico, along with Ronaldo, Raphael Varane and Modric.

The Wales international rewarded Benitez’s faith in him with an impressive performance, setting up both of Ronaldo’s goals.

Both assists came as a result of good persistence. Bale first got to a ball on the left ahead of Shakhtar’s goalkeeper to cross for Ronaldo to head home, before later capitalising on an error to race away and square a pass for his Portuguese team-mate to finish at the second attempt.

Meanwhile Juventus joined Manchester City in the Champions League knockout stages by beating Manuel Pellegrini’s men to move top of Group D.

Fernandinho blasted over from close range for the visitors before Mario Mandzukic volleyed last season’s losing finalists ahead soon after.

Fernando had a header tipped onto the post for City after the break, before Stefano Sturaro hit the post for Juve.