Rovers were denied a guaranteed spot in round five of the FA Cup by a last-minute equaliser in the 2-2 draw with Birmingham City.

Jordan James struck in the 90th minute to level things up just moments after coming on.

Rovers looked to have come from behind to secure victory after Bradley Dack equalised Reda Khadra’s early strike before Joe Rankin-Costello put them 2-1 up inside the opening minute of a second half that they had dominated until the closing stages.

However, James' late strike ensured it will be a replay at St Andrew’s on Tuesday as the game ended 2-2.

It was the worst possible start for Rovers who were behind after just three minutes.

They were architects of their own downfall as first Tyler Morton gave the ball away, and then Thomas Kaminski let a Reda Khadra shot squirm under him as the ball nestled in the roof of the net.

Birmingham were buoyed by that, and with a back five and two defensive midfielders infront of them, they were happy to let Rovers have the ball and hold their shape.

All of Rovers’ early efforts were from distance as a result, Neil Etheridge twice denying Ben Brereton, while he was well placed when Bradley Dack tried to catch him off his line.

Kaminski was then relieved as he failed to get enough behind Khadra’s shot from the right edge of the box that eventually dribbled just wide of the opposite post.

It was a nervy opening quarter for Rovers whose play was messy and lacking in control.

It was never going to be an easy task trying to break through but in Dack they have a man bang in form.

He needed no invitation to apply the finish to level with his fourth goal since the World Cup break in the 33rd minute.

Joe Rankin-Costello, booked for an earlier challenge on Tahith Chong, drove into the box, and while his shot was tipped onto the bar by Etheridge, Dack was on hand to tap home the rebound and level.

That came during a decent spell for Rovers, Sam Gallagher turning down a shooting opportunity after good play from Ryan Hedges moments before.

Birmingham finished the half the stronger though, and looked a threat from set plays.

In the 35th minute, George Friend nodded wide an inswinging corner, while from another set play, Kaminski denied Lukas Jutkiewicz.

Rovers were forced into an unplanned change as Ryan Hedges had initially looked to come out for the second half, but felt something, and was then replaced by Tyrhys Dolan.

Within a minute of the restart, Rovers had the lead through an unexpected source. The ball was bouncing around the box and then lashed into the corner by Joe Rankin-Costello for what was only a second career goal in his 51st appearance.

Birmingham almost restored parity within a minute, Chong breaking into the box after good work by Jutkiewicz, but fortunately for Kaminski the shot was straight at him as he was able to push the strike away.

Confidence was clearly high for Rankin-Costello who tried an ambitious effort on his left foot that flashed wide in what was a much more positive start to the second half by Rovers.

A threat still remained for the visitors though, demonstrated as Jutkiewicz headed over from a Friend cross, just as the visitors readied a triple substitution.

Then just after the hour, Khadra beat the offside trap, but went alone rather than squaring for a team-mate, and Kaminski denied his effort at the near post.

The game had come alive, but should have been all over in the 65th minute. Brereton and Dolan linked up on the break, as the latter was played through, but when he lifted the ball over the advancing Etheridge, the ball drifted wide of the post.

Anything on target and it would have been 3-1, and meant Brereton's wait for a goal will extend into a 10th game.

Lewis Travis was introduced for the final 15 minutes in place of Buckley as Birmingham sent on Juninho Bacuna in their fourth switch.

Travis was quickly into the action, running onto a Rankin-Costello pass to square for Dack who didn’t catch his shot well, but required saving by Etheridge.

A third would have killed the game, but despite their 14 efforts at goal by the 80-minute mark, Rovers couldn’t find that elusive goal.

That led to the likelihood of a nervy final 10 minutes, though Kaminski dealt easily with a curling Hannibal Mejbri free kick after Wharton was booked for a foul on Friend.

From a Rovers set play Carter headed wide from Morton’s delivery, before Birmingham threw caution to the wind.

First Jutkiewicz had a great chance when found by Chang’s deep cross, but his shot was put straight at Kaminski.

Then, as five minutes were added on, the visitors snatched an equaliser. Mejbri got in down the right to pull the ball back for James whose shot beat Kaminski, despite the ‘keeper getting a hand to his strike.

They will have to do it all again on Tuesday.

Rovers: Kaminski, Rankin-Costello, Carter, S Wharton, Pickering, Morton, Buckley (Travis, 75), Hedges (Dolan, 46), Dack (Szmodics, 87), Brereton, Gallagher (Vale, 90)

Subs: Pears, Phillips, Edun, Garrett, Leonard

Birmingham: Etheridge, Colin, Friend, Trusty, Sanderson, Long (Bacuna, 75), Bielik (Chang, 67), Gardner (Mejbri, 67), Chong (James, 88), Khadra (Hogan, 67), Jutkiewicz

Subs: Ruddy, Graham, Gordon, Donovan