Luiz Adriano opened the scoring late in the first half, Alex Teixeira made it 2-0 early in the second, and Douglas Costa curled a powerful drive into the left upper corner of the net in the 68th and headed in a cross from the left in 87th to complete the rout.

With the victory, Shakhtar moves to second place in Group D standings with eight points, one point ahead of Bayer Leverkusen and three points behind leader Manchester United. Real is last with one.

Shakhtar will next travel to Manchester on Dec. 10, while Real Sociedad will take on Leverkusen.

The game was roughly equal yet lacked rhythm. Real even looked pleased having amassed four attempts in the first 20 minutes.

The hosts waited until the 30th minute to pressure as Bernard and teammate Adriano probed the Real defense.

It all was over, however, in the 37th when Adriano tapped Douglas Costa's spinning pass home, following a short corner that caught Real temporarily off guard.

Inigo Martinez nearly equaled just two minutes before the break, but Shakhtar's Teixeira broke free to score two minutes later when the Real defenders failed to clear a loose ball.

Costa then hammered in a spectacular left-footed volley after receiving the ball from Teixeira, who progressed from his own end virtually unscathed.

The pace began to slow after the 80th minute despite Real making two substitutions and Shakhtar making three. Seven minutes later Costa scored his second goal with a header from the left side.

"It was a surprise for Real when Luis Adriano scored in the 37th right before the halftime," Shakhtar coach Mircea Lucescu said. "The key moment was when we pressured (immediately after the break) and Alex Teixeira scored the second goal for us."

Real coach Jagoba Arrasate said his team was unlucky.

"We didn't have any luck today. Until the first goal, we held our own, but after that we fell apart slowly," Arrasate said. "What can I say, it is disappointing, especially after we had so much hope coming into this game."