TURIN, Italy -- Spanish forward Alvaro Morata has completed a 20 million euro ($27 million) transfer from Real Madrid to Juventus.

Juventus announced details of the deal Saturday, saying that Morata signed a five-year contract with the club.

The deal also includes an option for Madrid to buy Morata back for up to 30 million euro ($40.6 million) after either the 2015-16 or 2016-17 seasons -- with the buy-back price determined by how many matches Morata plays.

The 21-year-old Morata scored 10 goals in 37 league appearances for Madrid in the past four seasons.

At Juve, Morata could be a second option in attack behind Carlos Tevez and fellow Spaniard Fernando Llorente.

Days after Massimiliano Allegri replaced Antonio Conte as coach, Juventus has also expressed interest in signing Argentine midfielder Roberto Peyrera from Udinese.