WHO would have thought the battle for fifth place in the Championship’s promotion race would be this dramatic. Middlesbrough got there in the end, just.

Derby County couldn’t overturn a three-goal swing and Middlesbrough’s three point advantage on the final day, they said. In fact, everyone did. But they had, and it took until the sixth minute of stoppage-time to prevent the Rams from completing the job.

Middlesbrough were on course for a Friday night feast with Fulham rather than a date with Aston Villa at the Riverside the following day in the first leg of the play-offs courtesy of a performance that left them trailing (twice) to Ipswich Town.

While Derby County were cruising to a comfortable 4-1 win over Barnsley at Pride Park, Middlesbrough’s supporters knew exactly what was going on there and how Tony Pulis’ side were on course to swap places with the Rams.

Given the quality of the teams in the play-offs, perhaps it doesn’t really matter where Middlesbrough finished as long as they got there. That was clearly not the impression Pulis nor his players gave off in the closing stages at Portman Road.

Middlesbrough had fallen behind inside eight minutes when Freddie Sears put Ipswich ahead and it took until Stewart Downing – on the ground where he made his Premier League debut 16 years ago – to equalise with 19 minutes remaining.

At that stage Middlesbrough looked like going on to win but Ben Gibson conceded a penalty for former Sunderland striker Martyn Waghorn to convert with seven minutes remaining – and the Fulham double header was back on.

But with the last corner of the game from Jack Harrison, fellow substitute Patrick Bamford applied the final header and his 13th goal to cap a dramatic end to the regular 46-game season that has been extended by at least two more.

And how everyone connected with Middlesbrough will hope there is an extra game added to that too, by virtue of a trip to Wembley where they will battle it out for the right to return to the Premier League stage.

It would have been easy for Pulis to have rested key players ahead of the play-off battle. Instead he named the same starting line-up as he did for the victories over Derby and Millwall and they performed well enough in patches to suggest they should have won.

It could have been perceived to be a gamble, with injuries in mind. He took that risk, though, in the hope of building momentum ahead of the up-coming battles with the Villans.

That meant Downing and Mo Besic, two of the main doubts ahead of the game because of knocks which prevented them from training earlier in the week, were in the team against an Ipswich team already looking ahead to next season.

Yet it was the home side, building on the 4-0 win at Reading a week earlier, who started like a team desperate for points, even if they remain under the caretaker charge of Bryan Klug following Mick McCarthy’s exit.

For the first ten minutes it was all about what they could come up with and, after Waghorn’s corner had gone straight against the post and to safety, it didn’t take them long to take the lead.

A ball down the line should have been dealt with but Gibson, normally commanding in such areas, was brushed off the ball far too easily. Even though there were claims for an illegal push, Sears capitalised by darting inside and then picking out Darren Randolph’s far corner.

After that Middlesbrough dominated the possession and Ipswich seemed much happier to sit deep, and attempt to contain the regular runs of Adama Traore. Despite plenty of nice play and pressure, Ipswich goalkeeper Bartosz Bialkowski was not tested enough.

Besic had a couple of wayward efforts curl high over the bar from the edge of the area and that was what Middlesbrough had to settle for because the blue defensive line regularly got in the way.

With half-time approaching Middlesbrough came within inches of scoring in quick succession. Firstly, Downing’s low cross from the left was almost turned into his own net by Adam Webster.

From the resulting corner, taken by Traore, Daniel Ayala saw an effort on the slide at the back post head towards the line and just when it seemed it would cross the white paint it was cleared by Callum Connolly. Middlesbrough could not get going in the second half. Rather than really take the game to the hosts in a bid to overturn the hosts’ advantage, Ipswich looked full of confidence and determined to increase the lead.

Quite how they didn’t do that before the hour was down to Randolph. The Middlesbrough goalkeeper, who has enjoyed an impressive first year at the Riverside, made two fantastic stops in quick succession.

The first was when he turned Waghorn’s back post volley behind for a corner with his leg and then from the flag-kick he made an even greater stop; this time flying to his left to tip over a stinging first time volley from Cole Skuse.

Middlesbrough counter-attacked but wasted plenty of good positions. The nearest they had come until the closing stages was when Downing’s scuffed effort from 20 yards looked to have fell invitingly for Assombalonga, but he couldn’t turn it goalwards and Bialkowski gathered comfortably.

Whether it was the news of Derby’s handsome lead over Barnsley filtering down to the players or not, Middlesbrough found an extra gear in the attacking third and it seemed more likely that they would win it after Downing’s leveller.

Downing found himself in acres of space outside the Ipswich box and he drilled a low effort through a crowded box that left Bialkowski unsighted and suddenly beaten, lifting Middlesbrough back up to fifth.

Seconds later Traore rolled Assombalonga in behind the defence and Middlesbrough’s leading scorer blasted into the side netting when it seemed for a brief moment to the visiting fans that it had found a way in.

But Middlesbrough pressed the self-destruct button again. A failure to clear their lines down their right ended with Gibson diving in recklessly in his own area on Ipswich’s Shane McLoughlin, who had knocked the ball beyond him.

The referee pointed to the spot and then Waghorn kept his composure and sent Randolph the wrong way to send Middlesbrough back down to sixth again.

For the final seven minutes there were a glut of Middlesbrough chances, including one when Bamford looked certain to level only for a late block, followed by a Bialkowski save to deny Traore.

Then when Ayala did find the net with a prodded finish at the back post when he reacted first to Besic’s stunning curler against the crossbar, the assistant’s flag wrongly went up for offside. It seemed like it to be, but then Bamford did the rest.