Porto have announced that they have reached an agreement to sell Ricardo Quaresma to Inter Milan.
The deal for Quaresma brings to an end a lengthy transfer saga and the fee could rise to as much as €25million (£20million) depending upon the winger's performances over the next three years.
Portugal international Quaresma is to undergo a medical at Giuseppe Meazza on Monday morning before putting pen-to-paper on a reported four-year contract.
A statement on Porto's official website read: "Porto has reached an agreement with Inter Milan for the transfer of professional footballer Ricardo Quaresma."
Inter's Portuguese midfielder Pele will move in the opposite direction as part of the transfer.
Quaresma's switch to Italy had looked in doubt after Inter president Massimo Moratti recently announced the club did not need Quaresma, but it now appears set to be completed.