The Teessiders forced the tie into penalties after Marc Bola scored in the first minute of second half stoppage time.

Jonathan Woodgate had made 10 changes from the team which lost to Brentford on Saturday, and there was a debut for goalkeeper Aynsley Pears, who followed in the footsteps of his dad Stephen by pulling on a senior shirt for the first time.

It was one of those changes, Stephen Walker, on his full debut, who forced the first save of the game when Dave Richards had to get down well to his right to deny the young striker.

Rudy Gestede also turned a shot across the face of goal while Walker had a shot blocked after good work by Marcus Browne. Marcus Tavernier also had an effort deflected wide of the mark, and Gestede just couldn’t quite find the target from the resultant corner.

But it was Crewe who took a surprise lead four minutes before half-time when a wayward shot struck Chris Porter and was diverted past a helpless Pears in the Boro goal.

And it was 2-0 before the break when Crewe moves the ball forward quickly and Charlie Kirk worked himself the opening to score.

Woodgate’s response was to introduce Britt Assombalonga and Paddy McNair for the second half - replacing Walker and Adam Clayton - as he demanded more from his side.

Boro did have a couple of shots blocked, but it was Crewe who carved out the first decent opening of the second half when Callum Ainley sent a shot just wide.

McNair also sent one wide for Boro as the clock started to tick down, but the goal finally came on 75 minutes when another of Woodgate’s substitutes, Ashley Fletcher, finished off a quick break forward.

The goal gave Boro a foothold back in the game, and Crewe goalkeeper Richards had to be alert to deny Marcus Tavernier as Woodgate’s men looked to level matters.

But Boro sent the tie into penalties when Bola thumped home the leveller at the back post, registering his first for the club since joining from Blackpool. 

The tie went to penalties and Assombalonga sent his spot kick over the top of the bar. Fletcher and McNair were successful with their attempts, but Marcus Browne saw his saved by Richards to send Crewe through to the next round.