Spanish champions Real Madrid have confirmed Ajax forward Klaas Jan Huntelaar will join the club in January.
The 25-year-old, who has long been linked with a move to Madrid, will sign a deal with the capital club until June 2013 subject to passing a medical.
According to the Ajax website, Huntelaar will join Madrid on January 2 for an initial 20million euros (£17m), rising to a potential 27million euros (£23m).
Madrid confirmed the deal in a statement posted on their own official website: ''Huntelaar is the new Real Madrid player. Real Madrid and Ajax Amsterdam have reached an agreement for the forward.
''As usual, the deal is dependent on the player passing a medical and the signing of his contract with Real Madrid. 'Klaas Jan Huntelaar will be tied to Real Madrid until June 30, 2013.''
The deal, which will provide Real with cover for long-term injury victim Ruud van Nistelrooy, will earn Dutch club Heerenveen around €2.5million as part of the agreement Ajax signed when they signed the player in 2005.
The prolific frontman was a target for a number of clubs at that time with the Dutch giants reported to have turned down a big-money bid from Manchester City, while Madrid, Manchester United and Arsenal were also apparently keen admirers.
But Ajax technical director Danny Blind decided now was the right moment to let the player go.
''We as a club wouldn't make a deal if we weren't satisfied with the details, but also with the timing of the transfer,'' he said. ''We did our best to extend Klaas Jan's contract, but we failed. His current contract runs for just one and a half years and we had to take that into account.
''After being at Ajax for three years it's a nice step in his career. He absolutely deserves this transfer.''
Ajax coach Marco van Basten was less impressed with the timing of the transfer.
''I don't begrudge him this transfer, but from a sporting perspective we would rather have seen him end the season here,'' he said.
''Obviously when a club like Real Madrid comes in, it's going to be very difficult to keep him. And as a club we must think of more than one player - it's all about having a future-proof policy.''
Madrid defender Michel Salgado said he would welcome Huntelaar to the Bernabeu especially as UEFA rules state that the player can be eligible for Madrid's Champions League, having only competed with Ajax in this season's UEFA Cup.
He said: ''What we know is that he is a born goalscorer due to the amount of goals he has scored in the Dutch league, he is young and he could play in the Champions League. Anyone who comes here will be welcomed.''
The deal brings to an end a frustrating time for Madrid in the transfer market after missing out on top target Cristiano Ronaldo in the summer.
Yesterday, Madrid president Ramon Calderon revealed the club were ''very close to signing a winger and a striker in January''.
He added: ''I've been told they are young and quick and they will come to reinforce the team.''
Madrid fans have been calling for reinforcements in the midst of a poor start to the Primera Liga season.
The Bernabeu club are currently fourth in the table, six points behind leaders and fierce rivals Barcelona.
Calderon was forced to come out in support of coach Bernd Schuster yesterday for the second time in a fortnight following Saturday's dismal 3-1 defeat to neighbours Getafe.
After joining Ajax in January 2005 Huntelaar has gone on to become one of the most potent strikers in Europe, scoring 76 goals in 92 league matches for the Amsterdam team and netting 10 goals in 18 appearances for the Netherlands.