A Cristiano Ronaldo masterclass in Sochi carried Portugal to a stunning draw with Spain as the legendary striker claimed his 51st career hat-trick.

Legendary forward Cristiano Ronaldo stole back a draw in the dying minutes of Portugal’s Group clash against Spain, sealing his 51st career hat-trick with a stunning free kick.

The action kicked off early after Ronaldo was granted a penalty in the box following a knock from Spain’s Jose “Nacho” Iglesias in the 3rd minute.

The Real Madrid star slotted in the free kick with ease to put the underdogs ahead before anybody could blink.

Spain hit back soon after in the 24th minute with an incredible effort from Diego Costa, who sliced through three defenders with relative ease before finding the back of the net to level the score.

The Spaniards kept ample pressure on the men in red all the way up until halftime with the passing delights of their front four forcing the opposition’s defence to work overtime.

But a momentary passage of play in the waning seconds before the break saw Ronaldo through for a second and leave the Portuguese on top.

A long ball from the midfield found its way to Ronaldo’s boot. A quick step around the final defender left the Real Madrid star one-on-one with goalkeeper David De Gea, who fudged his save and handed Portugal the lead.

Costa scored his second goal of the night shortly after after cleaning up a header from teammate Sergio Busquets following a free kick in the 55th minute.

The Spaniard was joined on the scoreboard by teammate Jose “Nacho” Iglesias after a stylish procession of play saw him left open for a long shot on goal. The defender curled the ball perfectly past goalkeeper Rui Patrício’s glove and brought the score to 3-2 with half an hour remaining on the clock.

Cristiano Ronaldo made it a hat-trick late in the piece after slotting in a beautiful free kick, curving the ball over the wall and into the back of the net to leave the score at 3-3 with a minute left on the clock.

Photo: The Guadian  | Getty Image | AP