Atletico Madrid midfielder Oliver Torres is currently on loan at Porto, but the Portuguese side have now exercised their right to buy the 22-year-old.
When the Spaniard joined Porto, a buy-out option of 20 million euros was included in the initial loan and this will be effective from the end of the 2016/17 season.
Former Real Madrid captain Iker Casillas plays for dragons and Torres has become a regular in the starting line-up along with his compatriot, Ivan Marcano.
The move comes after a successful loan spell in Portugal during the 2014/15 campaign, but Torres was unable to break into Diego Simeone's side during his time back in Madrid.
As part of the original deal, Diego Jota was loaned from Porto to Atletico.