Real Madrid has signed Brazilian midfielder Kaka from AC Milan, the Primera Liga club said on its website on Tuesday. The 27-year-old international has agreed to a six-year contract to become the first player to join Real since Florentino Perez returned to the presidency this month. Reports said the transfer fee was around 68 million euros ($94.05 million) which would make it the second biggest ever after Zinedine Zidane joined Real from Juventus for around 73 million euros in 2001. Kaka, 27, training with the national team in Brazil ahead of the next round of World Cup qualifiers, said the finalization of the six-year contract marked the end of a “soap opera” that will usher in a new phase of his career in Spain. “Now the soap opera is over,” Kaka told a media conference after a practice ahead of Wednesday's Brazil-Paraguay qualifier in the northeastern coastal city of Recife. “The only leftover details were the medical exams, and I've done them. The negotiations are closed and I have sealed my transfer to Real Madrid.” Kaka, whose real name is Ricardo Ezecson Dos Santos Leite, passed a medical in Recife earlier Monday. The official unveiling in Madrid is likely to take place at the end of the month, after the Confederations Cup in South Africa. “We are working on building a good team, an important team, and this has only just begun,” Perez told radio station Onda Cero. Kaka is the first player to join Madrid since Perez regained the club presidency unopposed last week. Future targets already discussed include Manchester United's Cristiano Ronaldo and Franck Ribery of Bayern Munich. Perez has said he intends to revive his “galactico” policy which, along with Zidane, attracted star players such as David Beckham, Brazilian striker Ronaldo and Portugal star Luis Figo to Madrid earlier in the decade. Kaka described Perez' strategy as “an interesting sports project.” “He's trying to buy other players, and I think he can make a very (attacking) team,” he said. “That's behind my decision to go to this team.” Kaka said he talked with Beckham about his transfer, and the England veteran told him it would be the best step for his career. Villa set to join Kaka Valencia striker David Villa, one of the stars of Spain's victorious Euro 2008 squad, is close to signing for Real Madrid, a Spanish newspaper said Tuesday. He would become the second big name to join the club under new president Florentino Perez, after Brazil's 2007 world footballer of the year Kaka completed his transfer from Italian giants AC Milan on Monday for a reported 65 million euros. The sports daily Marca said Real is set to pay 37 or 38 million euros for Villa plus bonuses linked to future results.