The 26-year-old will join Posh permanently over the summer as part of the deal with an undisclosed fee, with the League Two side reporting that to be more than £1million, a record for the division.
Posh chairman Darragh MacAnthony said: "I am absolutely delighted.
"We have stolen a march on at least six of our Championship rivals and I can understand why Steve Evans is so devastated to lose a key player at such an important stage of the season."
Barnett added: "I am very pleased to be a Peterborough United player and I am very excited about the challenge ahead.
"I am chuffed to bits. I have always followed Peterborough, a few mates have come down here to play and love it here and I cannot wait to get started.
"I think Peterborough had a bid rejected in the transfer window, but I didn't let that affect me, I just concentrated on the football."
It ends a long pursuit of his services by Posh manager Darren Ferguson, who originally tried to sign Barnett and his team-mate Kyle McFadzean in a January double swoop.
Crawley chief executive Alan Williams has said the fee surpassed the valuation placed on Barnett and therefore, they could not reject the offer.
"The offer from Peterborough not only met but exceeded the board of directors' valuation. We must never forget that we are first and foremost a business and this is a great deal for us."
The move is sure to come as a blow to Crawley manager Steve Evans' promotion push as Barnett had scored 15 goals this season - especially after the sale of fellow striker Matt Tubbs to Bournemouth in January.
"We all wish Tyrone every success and he leaves with our best wishes. He has scored some fantastic goals here and has always been a top class professional," continued Williams.









