Kilmarnock striker Kris Boyd will join Rangers on 1 January on a deal whichs runs through to the summer of 2009.
Ibrox manager Alex McLeish was given permission to speak to the 22-year-old, who had also been targeted by English Championship side Sheffield Wednesday.
Kilmarnock chairman Michael Johnston said: "I am pleased to say we reached a successful conclusion after talks and we have agreed a fee with Rangers.
"It is close to what we are looking for, which was £500,000."
Boyd - who is currently the Scottish Premier League's leading scorer, with 15 goals - was out of contract in the summer, leaving him free to speak to any interested clubs from 1 January.
Killie chief Johnston also revealed that Kilmarnock will benefit if Rangers sign Boyd and then sell him in the future.
He added: "We have secured an agreement on a percentage of a future fee, which we felt was important because we feel certain Kris Boyd is going to develop very well."
A lifelong Rangers fan, Boyd must now sit out the Christmas fixtures.
But he can look forward to a debut for his new club next month, probably in the Scottish Cup tie against Peterhead on 7 January at Ibrox.
He said: "I was at the game at Ibrox as Rangers qualified for the last 16 (of the Champions League) and to have the chance of playing is fantastic.
"It's fantastic to finally sign for the club. There has been a lot of speculation in recent weeks and I'm really pleased that it is now all done and dusted."