"A wild game": Ipswich manager Kieran McKenna on 4-3 win against Rotherham
The Blues are now level with second placed Leeds
Blues substitute Omari Hutchinson struck the winner at the death as Ipswich boosted their Championship automatic-promotion hopes with a 4-3 win over bottom-placed Rotherham.
Hutchinson's effort in the sixth minute of added time after Cafu's levelling penalty moments earlier left the Tractor Boys behind second-placed Leeds only on goal difference, with Southampton losing to Hull.
"A bit of a wild game"
Ipswich manager Kieran McKenna described his team's narrow victory as a "bit of a wild game".
McKenna said: "It was a bit of a wild game. Of course it wasn't a good start and from that moment we never really regained our composure in the game but having said that we have scored four goals at home, we find a way to win the game.
"Every game in the Championship is tough. I knew it was going to be a tough game; the players have found a way to come out on top again and credit to them for that."
With eight minutes of time added on, McKenna said: "We weren't managing to keep control of the ball. We were pinned into our box and random things can happen at that point.
"I didn't think we had that many chances against us and when they got the penalty I thought it was going to be one of those nights but credit to the players they could lie on the floor and give up on the game but we find the spirit to get the ball back, launch another attack and produce another moment of real quality to win the game."
"You saw the good, the bad and the ugly"
Rotherham head coach Leam Richardson felt his side deserved a point.
He said: "You saw the good, the bad and the ugly of what we are and why we are in the position we are in.
"I'm disappointed for the players who worked terrifically hard. We started the game very well, we had a crazy 10 minutes. The first goal hurt us, we never really recovered from it, it was like a dazed boxer but the last hour we probably deserved something from the game.
"I don't think many teams come here and dominate all the stats and score three goals and not win the game so disappointed for the players."
The game in more detail
Town initially fell behind after just two minutes through Tom Eaves, but responded thanks to a Keiffer Moore strike and Wes Burns' first-half brace.
Hakeem Odoffin pulled one back for the Millers in the second half before the nail-biting additional time.
The visitors got off to the perfect start through Eaves.
Ipswich defender Harry Clarke had a chance to clear from Town's penalty box but Sam Clucas stuck out a foot and toed the ball into the path of the Millers striker who guided his shot beyond the reach of goalkeeper Vaclav Hladky.
But Town struck back eight minutes later through Burns.
Sam Morsy swept forward into the Rotherham penalty area and his cross was firmly headed home by the winger.
Ipswich's dominance after conceding an early goal paid off in the 14th minute when Moore put them in front, notching his fourth goal in five games following his arrival on loan from Bournemouth.
It came from a wonderful run down the right by Burns who swept past Lee Peltier. His pinpoint cross found the unmarked Wales international striker who side-footed home on the run and into the far left corner of the net.
Burns got his second goal to put Town further ahead in the 29th minute.
Conor Chaplin played him in down the right and his initial shot was parried out by Viktor Johansson but fell to raiding full-back Leif Davis whose shot found Burns and he stabbed home from close range.
There was a lengthy delay when Rotherham midfielder Ollie Rathbone crashed into the advertising boards following a challenge with Jeremy Sarmiento and was stretchered off on the medical cart to be replaced by Femi Seriki.
Burns almost completed a hat-trick when he headed narrowly wide of the Rotherham left-hand post but the visitors pulled a goal back through Odoffin.
Hladky failed to punch the ball clear when challenged in the six-yard box and it fell to the Rotherham central defender who coolly slotted the ball into the empty net.
United pressed for an equaliser and Sam Nombe struck the post but they equalised in added on time with a penalty by substitute Cafu, only for Hutchinson to secure the three points with a stunning strike past Johansson to raise the roof of Portman Road.