Real Madrid payed the buy-out clause, that is 27M euro. he will sign a 8-year contract. the deal got closed just minutes before the transfer window closed.
http://www.realmadrid.com/articulo/comunicado_oficial_25473.htm
http://www.realmadrid.com/articulo/comunicado_oficial_25473.htm