Peterborough have completed the permanent signing of striker Dwight Gayle from Dagenham in a deal worth up to £750,000.
The 22-year-old has signed a four-and-a-half year contract, with the move set to go through on 2 January, a day after the transfer window reopens.
Gayle has been on loan at London Road since November, scoring five goals in six appearances.
Posh will pay an initial £500,000, which could rise subject to add-ons.
Peterborough manager Darren Ferguson told the club website: "Dwight has done very well. I am pleased that everything has been sorted out and credit to the chairman for providing the finance for the deal."
Gayle added: "I am delighted that everything is sorted. I have really enjoyed my time at the club during my loan spell and I am very pleased to be staying."
The Daggers youth product only featured 20 times for the first team before securing a loan move to Championship club Peterborough last month.
He spent last season on loan with Blue Square Bet North outfit Bishop's Stortford, scoring 42 goals.