Chris O'Grady scored a late winner to send Wednesday into round four of the FA Cup at the expense of Championship side West Ham.
With the third round tie seemingly heading for a replay, O'Grady struck in front of the Kop to seal the Owls' passage.
There were chances at either end, the best of which was Sam Baldock's penalty for the Hammers just after half time but Nicky Weaver produced a marvellous diving save to deny the former MK Dons striker.
Promotion remains the priority for both teams but still Wednesday and West Ham served up an entertaining cup clash with unfamiliar line-ups.
Sam Allardyce made numerous changes for the capital club, while Gary Megson was forced into a reshuffle with Ben Marshall unable to play under the terms of his loan agreement with parent club Stoke.
That meant a start on the left of midfield for Julian Bennett and a rare berth up front for Jermaine Johnson alongside O'Grady.
The Hammers asked the first question early in the opening period when Henri Lansbury found space down the left side of the penalty area and his cross was deflected on to the top of the bar by Jon Otsemobor.
Wednesday responded with James Tavernier breaking free from the engine room only to drag a low effort past Ruud Boffin and the far post.
The best chance of the half, though, fell to the Owls on the 20-minute mark. O'Grady sent Jermaine Johnson scampering in on goal with a delightful slide rule pass but the Jamaican international's controlled finished rolled agonisingly past the upright.
Danny Batth, who scored his maiden goal for the Owls over the festive period, almost doubled his tally ten minutes before the break with a bullet header that whistled wide from Bennett's long throw.
Then Jack Collinson might have done better for the Londoners with a close range header that went high and wide after good wing work from Freddie Sears.
Three minutes after half time, the Hammers should have taken the lead - and would but for some superb goalkeeping from Weaver.
Reda Johnson was adjudged to have tripped Winston Reid in the box and the referee pointed to the spot.
Baldock's penalty was driven low and hard but Weaver responded with a top-class save to keep the visitors out.
The Owls introduced Clinton Morrison on the hour and the striker teed up O'Grady within a few minutes of his arrival, forcing Boffin into a diving save to avert the danger.
Play soon went back to the other end and Baldock was unlucky once more, this time driving a fierce shot beyond Weaver that smacked against the far post.
With a replay far from ideal, both sides pushed forward for a winner and it was Wednesday - and O'Grady - that took the plaudits.
The striker picked up possession down the right channel on 88 minutes and turned to drill an accurate shot past Boffin to send the Owls into the next round.
Wednesday: Weaver, Otsemobor, R Jones, Batth, R Johnson (Morrison 59), Bennett (Lowe 83), Semedo, Lines, J Johnson, Tavernier (D Jones 72), O'Grady
Unused substitutes: Bywater, Beevers, Palmer, Prutton
West Ham: Boffin, Reid, McCartney, Baldock, Collison (Hall 72), Carew (Nouble 64), O'Brien, Sears, Lansbury, O'Neil, Potts
Unused substitutes: Green, Tomkins, Bouba Diop, Montenegro, Lee