Kiev - Spanish giants Real Madrid survived a nervous finish when they conceded three late goals to edge Shakhtar Donetsk 4-3 and wrap up top spot in Champions League Group A.
Cristiano Ronaldo scored twice while Luka Modric and Dani Carvajal were also on target for Real who had already made sure of their place in the last 16 before Wednesday's match at the Lviv Arena.
But just four days after suffering a 4-0 mauling at the hands of Barcelona in El Clasico, there were still worrying signs of Real's defensive frailities for under-pressure coach Rafael Benitez.
They were cruising at 4-0 on Wednesday before Shakhtar hit three goals in the last 12 minutes with stand-in skipper Alex Teixeira scoring twice and fellow Brazilian Dentinho also on target.
"Today everything went our way for most of the game," Benitez said.
"But Shakhtar are a strong and aggressive team. There's no surprise that they have scored at home.
"We've conceded 10 goals in our last three matches but today we acted as a single unit, as a team and that's a very encouraging sign.
"We've scored four goals away from home. I believe this shows that our club is moving in the right direction."