James Dornelly headed home the winner as Posh secured another pre-season victory, this time at the home of Sky Bet League Two new-boys York City.
Peterborough United continued preparations for the new Sky Bet League One campaign with a 2-1 victory at York City on Tuesday night as the Minstermen celebrated the testimonial of long-serving Paddy McLaughlin.
Luke Williams' side played some excellent football at times and deserved to come away with the victory, which was secured by a goal in each half from Brandon Khela and James Dornelly.
After a relatively cagy opening to the contest, there was a plethora of chances around the quarter-hour mark with Maguire heading over for the hosts before Harry Leonard's effort from range cleared the crossbar.
Khela saw an effort deflect over the top moments later before Carl Johnston saw a rasping drive blocked. On 24 minutes, Posh got their noses in front as a well-worked move led to KHELA finding the bottom corner with his left-foot for his second goal of pre-season.
The hosts levelled the scores on 51 minutes as NEWBY was allowed time to drift into the box before beating Alex Bass via a deflection off the boot of David Okagbue.
Pearce headed wide on 53 minutes before Posh made some changes with Ben Woods, Chris Conn-Clarke, Evan Weir and the trialist introduced. On 64 minutes, Leonard had a good chance to put Posh back in front, but he headed wide from a Harley Mills centre.
Conn-Clarke saw a shot blocked moments later before Okagbue headed over at the back post. On 76 minutes, Posh came close again as Leonard stuck the bar with a diving header following a left-wing centre.
On 79 minutes, Posh did make it 2-1 as a short corner routine was worked to Woods, who delivered a fine centre into the box, which was powered home by DORNELLY.
Weir did well to clear a tempting cross at the other end while Woods saw a shot blocked before the referee brought an end to the contest.
Posh are next in action on Saturday when they welcome Sky Bet Championship side West Bromwich Albion to the Weston Homes Stadium (3pm).
York City: McNally, Palmer, Pearce, Maguire (sub Stiver 60min), Read, Hewitt (sub Farrar 46min), Williams, McLaughlin (sub Shelton 6min, sub Brookes 60min), Newby, Hunt (sub Felix 65min), McArthur. Unused subs: Sykes-Kenworthy.
Posh: Bass, Johnston (sub Conn-Clarke 60min), Jones (sub Woods 60min), Khela, Leonard, Edwards (sub Abbey 78min), Mills, Mendonca (sub Weir 60min), Shofowoke (sub Trialist 60min), Okagbue, Dornelly. Unused subs: Andeng Ndi, Fox, Freeman, Kamara.
Half-time: York City 0-1 Peterborough United
Full-time: York City 1-2 Peterborough United
Attendance: 2,324 (304 Posh fans)
Referee: Garreth Rhodes