Carlos Tevez smashed home a second-half penalty as hosts Juventus stunned holders Real Madrid with a 2-1 win in an absorbing Champions League semi-final first leg.

The irrepressible Argentine won the spot-kick just before the hour when he was upended by Dani Carvajal and tucked it away.

Juve's Alvaro Morata had opened the scoring against his old club in the ninth minute in front of a boisterous home crowd, but Cristiano Ronaldo headed the equaliser for Real in the 27th minute.

"We need an exceptional display in Madrid to get to the final. Small episodes can change the result in the Champions League and you also need a bit of luck," said Juve coach Massimiliano Allegri.

The game could have turned out very differently for Real, but James Rodriguez wasted a glorious chance when he headed against the bar from point-blank range.

"We did well in parts, we played some good football, with patience, and we have had some good chances," said Real manager Carlo Ancelotti. "The result is not good, but it is not bad either."

Ronaldo's goal meant the Portuguese regained the lead from Lionel Messi as the Champions League's all-time leading scorer with 76 goals.

Ronaldo had already wasted one free-kick, which he drilled into the wall before Juve took the lead with a simple goal.

Claudio Marchisio threaded the ball to Tevez, whose shot was saved by Iker Casillas, but went straight to Morata, who tapped home.

Real regained their composure and equalised when Rodriguez flicked the ball over a defender for Ronaldo to head home. Real then seemed poised to take control of the match but fell behind again after an attack broke down.

The ball was cleared to Morata, who sent Tevez charging away and the Argentine's run ended in the Real penalty area where he was bundled over by Carvajal.

Tevez got up to beat Casillas from the spot.

"We expect a much more difficult game than today in the second leg," said Juve midfielder Arturo Vidal, whose team are in next month's Italian Cup final with Lazio. "It's everyone's dream to win the Treble and we are close to doing it."