Off-colour Wednesday saw their FA Cup campaign ended by League One Shrewsbury Town who struck in the sixth minute of injury time.
A lacklustre Owls side were twice deservedly pegged back by struggling Shrewsbury who then grabbed the winner through Andy Mangan.
Lewis McGugan put Wednesday ahead on two occasions in only his sixth start of the season but Jean-Louis Akpa Akpro and substitute Shaun Whalley grabbed the equalisers for the hosts.
Mangan then headed in from close range to book the hosts' place in the fifth round, a goal which proved controversial with Wednesday denied a seemingly stonewall penalty moments earlier.
Carlos Carvalahal opted for nine changes for the cup tie with only Vincent Sasso and Gary Hooper retained from the 1-1 draw at Reading.
Marco Matias returned to the side for the first time since the win at Brentford in September, on loan Aston Villa full back Joe Bennett was handed his debut while Michael Turner returned from injury for his first appearance in six weeks.
And the unfamiliar starting XI brought an unfamiliar sluggish performance.
Wednesday lacked sharpness in attack, struggling to build the rapid attacks that have become a common factor of their play under Carvalhal.
They were more than happy to play keep ball in the early stages, passing across the back four and biding their time for an opportunity.
But as the game wore on they were incredibly sloppy and looked very vulnerable against the counterattack of Shrewsbury, who more than deserved something from the tie.
It has been a comfortable start and their first opportunity came on six minutes when McGugan latched onto a loose ball 25 yards out and drilled over the bar.
Shrewsbury probed well at times and it took alertness from Lewis Price to race out and claim Jordan Clark's dangerous ball with Andy Mangan lurking.
But Wednesday took the lead on 19 minutes.
McGugan stepped up when Matias was fouled 30 yards out and powered the free kick towards the far post with the ball evading everyone to nestle into the corner.
Rather than looking comfortable with the lead, Wednesday became a little sloppy with their energy levels dropping.
Shrewsbury got players back very well, making it difficult for Carvalhal's side to play through them.
On the only real occasion when they did so in the first half, Bennett weaved his way into the box via a couple of neat one-twos but struggled to get his shot away.
And moments later, Lucas Joao really should have doubled their lead when he met Modou Sougou's searching cross but headed over from eight yards.
It took a superb sliding tackle from Jose Semedo to take the ball off Mangan's foot as the Shrewsbury forward shaped to shoot while Akpa Akpro was blocked out when attempting the follow-up.
The Shrews really began to show their danger on the break after half time. Larnell Cole fired straight at Price from 20 yards after a swift build-up while Grimmer did the same from further out moments later.
These turned out to be warning shots as the hosts drew level on 56 minutes. Shrewsbury broke again with Mangan leaving Sasso standing before crossing to the unmarked Akpa Akpro who headed home from six yards.
Wednesday really struggled to threaten and it took a 40 yard run with the ball from the unlikely figure of Jose Semedo to give them an opening with the Portuguese forcing a save from Leutwiler. McGugan smashed over the bar from the resulting corner.
Shrewsbury really ought to have been ahead on 64 minutes when Akpa Akpro broke clean through but was denied by a strong hand from Price.
Wednesday looked to have grabbed an undeserved winner when they went back ahead on 76 minutes. McGugan pounced on a half clearance and struck a sweet side volley from 20 yards which rifled into the far corner via a slight deflection.
But they failed to keep possession and allowed Shrewsbury to force their way back into the game.
A brilliant sliding tackle from Vincent Sasso denied Mangan as he shaped to shoot.
But the Shrews were then awarded a penalty when Sasso tripped Akpa Akpro. The forward then rose to take the spot kick, only to see it saved by Price but Whalley charged in to slam in the rebound.
The Shrews were not content to settle for a replay, especially when six minutes of injury time were called.
But Wednesday really ought to have had an opportunity to grab the winner deep into added time. Zak Whitbread climbed all over substitute Atdhe Nuhiu but referee Paul Tierney waved away protests.
And the hosts grabbed the winner in the dying seconds. Substitute Scott Vernon punished slack defending by Bennett to send in a cross which Grimmer powered home with a close range header, sending the Greenhous Meadow into raptures and Wednesday out.
Shrewsbury: Leutwiler, Smith (Wallace 79), Whitbread, Knight-Percival, Grimmer, Cole, Clark, Black (Whalley 79), Brown, Akpa Akpro, Mangan. Subs not used: Halstead, Sadler, Vernon, Ogogo, Jones.
Wednesday: Price, Palmer, Turner, Sasso, Bennett, Sougou (Wallace 71), Semedo, McGugan, Matias (Lee 78), Hooper (Nuhiu 61), Joao. Subs not used: Dawson, Pudil, Bannan, Bus.
Referee: Paul Tierney (Lancashire)
Attendance: 5,699 (1,512 away)