(CNN) -- AC Milan are poised to complete the signing of striker Klaas-Jan Huntelaar from Real Madrid after both clubs agreed an undisclosed fee on Thursday.
Klaas-Jan Huntelaar struggled to make a big impact in his year and a half at Real Madrid.
The Netherlands international is due to have a medical with the Italian club on Friday, Milan announced on its official Web site.
The 25-year-old has agreed a contract that will tie him to the Rossoneri until the summer of 2013, the club said.
Spanish giants Real, seeking to balance the books after a summer of massive spending, also confirmed the agreement on their official Web site.
Italian newspaper Gazzetta dello Sport had earlier reported that the transfer fee would be $21.5 million, with Huntelaar to earn $4.3 million per year.
Milan lost their star forward Kaka to Madrid earlier this summer, and hope to add Huntelaar to an attacking pool of Brazilians Ronaldinho and Pato plus veteran Italian Filippo Inzaghi and Marco Borriello.
Huntelaar, who turns 26 on August 12, had seemed set to move to German club Stuttgart earlier this summer but the deal fell through.
He had also been linked with English club Tottenham after failing to make a big impact following his $29 million move from Dutch side Ajax in January 2009.
Huntelaar had been the Eredivisie's top scorer in the 2007-08 season, but netted only eight goals in 19 appearances for Real after being brought in when fellow Dutch forward Ruud van Nistelrooy was ruled out with a long-term injury.