Daryl Murphy scored deep in injury time as Ipswich secured a dramatic victory at high-flying Blackpool.
Stephen Dobbie put Blackpool ahead with a first-half header, before Frank Nouble drove in the equaliser and Paul Taylor curled in to put Town 2-1 ahead.
Steve Davies thought he had salvaged a point with a strike that found the top corner in stoppage time.
But there was still time for Murphy to head in the winner from Taylor's cross to give Ipswich victory.
Ipswich end drought
Town's victory was their first in six matches, with their last win coming on 28 September when they defeated Brighton 2-0.
Both sides were sluggish in their early efforts to gain a foothold in the game and it took 20 minutes before the first opportunity of note.
A period of pressure from Ipswich saw the ball fall to Ryan Tunnicliffe in a central position, eight yards from goal, but his effort deflected narrowly wide of the left-hand post.
That chance sparked some life into proceedings and three minutes later the deadlock was broken, with Blackpool taking the lead with their first meaningful opening.
A curling left-wing cross from Bobby Grant found Dobbie free inside the box and he steered a fine header past Dean Gerken and into the bottom left-hand corner.
And it could have been 2-0 to the Seasiders before the break as a long ball forward was flicked on by Ricardo Fuller into Grant's path but his stinging volley was brilliantly palmed away by Gerken.
Ipswich made two changes at half-time, with Taylor and Nouble replacing Luke Hyam and Jay Tabb, as manager Mick McCarthy adopted a more offensive approach in the second period.
The substitutions appeared to have an effect, with the visitors pressing forward in greater numbers and Blackpool happy to operate on the counter-attack.
On 61 minutes a right-wing cross from Carlos Edwards found Murphy free to the left-hand side of the box but the Irishman sliced his first time effort wide on his weaker left foot, in what was a big let off for the home side.
But Ipswich's bold approach paid dividends and with their next foray forward they were rewarded with a goal their efforts deserved.
David McGoldrick burst past Angel Martinez in midfield and his through ball found Nouble just inside the box and he duly bustled his way past Bradley Orr before finishing inside Matt Gilks's left-hand post.
The Seasiders looked lethargic and bereft of ideas, with Davies replacing Fuller as the hosts looked to stop the visitors.
But Taylor found himself in space inside the box on 84 minutes and he curled a delightful low strike into the bottom left-hand corner to make it 2-1 to the away side.
Davies thought he had rescued a point for the hosts late on but Murphy had other ideas.
Blackpool assistant boss Alex Rae said:
"It's very disappointing. We pride ourselves on our defence and to lose the game from bad defending is disappointing.
"We've scored a lot of goals in the last 10 minutes of games and I thought we'd snatched a point.
"We told them Murphy was a threat from set-pieces - he scored from one against Barnsley last week - but we didn't deal with him at all."
Ipswich manager Mick McCarthy said:
"It's a reverse of what's happened to us in a couple of games. We had a pretty awful first half. I worked in training on what ifs.
"We had three up front and one behind and three or four different shapes.
"I did it for that reason. Very often we played 4-4-2 and you have to change the shape. It's paid dividends thankfully."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.