Finally, a deal was achieved between Porto and Barcelona the day after the Euro 2004 final. Barcelona agreed on a €15 million fee in cash, plus the complete rights of Quaresma to Porto, which tagged Quaresma for €6 million. Deco signed a four-year deal with the Catalan side on 6 July 2004.