Tony Mowbray enjoyed his first win as Birmingham City boss as substitute Koji Miyoshi scored a last-minute winner to send them into an FA Cup fourth-round tie at Leicester City at the expense of fellow Championship side Hull City.
Miyoshi was one of five substitutions made by Mowbray after 63 minutes with the home side trailing 1-0 to Jason Lokilo's first-half goal.
The changes quickly paid dividends when Matt Ingram could only parry Miyoshi's initial shot and fellow sub Adam Stansfield controlled the rebound well before firing in.
The first tie between the sides 10 days ago finished 1-1 and the replay looked destined to mirror that game before the Japanese won it with a finish at the second attempt after some poor defending from the visitors.