Aaron Cresswell's late goal gave Ipswich victory over Peterborough and their fourth successive home win.
Grant Leadbitter's drilled finish gave the hosts the lead but Posh levelled when Tyrone Barnett poked past home goalkeeper Alex McCarthy.
Daryll Murphy headed Ipswich ahead only for Emile Sinclair to squeeze home a second Peterborough equaliser.
But Cresswell's effort from distance, which took a wicked deflection, gave the home side all three points.
The match began in an attacking style as Ipswich looked to avenge the 7-1 defeat inflicted in the reverse fixture.
Top scorer Michael Chopra spurned a glorious chance to open the scoring inside 90 seconds when he shot tamely at goalkeeper Paul Jones after he beat the Peterborough offside trap.
Leadbitter was not as wasteful when Peterborough failed to clear a corner, but Barnett, who will complete a permanent move from Crawley Town in the summer, then equalised from a George Boyd pass.
There was then a lull in the scoring before Murphy headed in from six yards 13 minutes from time.
Sinclair found space between two Ipswich defenders to score level things up again, before Cresswell's 20-yard speculative strike took a nick to leave Jones helpless.
The victory eased Ipswich further into mid-table security and pushed Peterborough down to 18th spot, 10 points from the relegation zone.