Goals either side of half time from Ben Watson and James McClean were enough to send Wigan Athletic through to the fifth round of the FA Cup at Crystal Palace's expense – in a match that was overshadowed by a neck injury to Jonathan Parr.
Tony Pulis shuffled his Palace pack for the encounter, with Paddy McCarthy captaining the side for the first time since April 2012 in one of four changes to the side that beat Stoke City last weekend.
Stuart O'Keefe, Barry Bannan and Cameron Jerome were also recalled to the starting line-up, with Danny Gabbidon, Mile Jedinak, Joel Ward and Yannick Bolasie all rested.
Those changes may have contributed to a slow start from the visitors, as Wigan enjoyed more of the ball during a cagey opening period, but it was Palace who fashioned the first meaningful attempt at goal after eight minutes. Jason Puncheon found room on the right and slipped a neat pass into the path of Marouane Chamakh. The Moroccan got his head up and unselfishly cut the ball back for Cameron Jerome, but Ali Al Habsi clawed his strike away from the top corner.
Pulis' Premier League charges seemed to settle after that and they created another decent opening just five minutes later. Chamakh was again involved as he got to the byline and pulled a low cross back for Stuart O'Keefe, but his first-time strike went straight down the throat of Al Habsi.
Wigan began to edge their way into the game though and Eagles academy graduate Ben Watson saw his strike from distance fizz past the far post, before James McClean smashed a wild volley over the bar from 18 yards as the Latics pressed for a first-half opener.
That eventually came on 36 minutes as Wigan put together the best move of the half to break the deadlock. Beausejour's ball down the line was clipped around the corner by Roger Espinoza into the path of McClean. The lively winger got to the byline and laid the ball back for the on-rushing Watson, who opened his right foot to guide the ball beyond Julian Speroni and into the far corner.
As the heavens opened at the DW Stadium, Parr required a lengthy period of treatment after a heavy aerial clash with Callum McManaman, which eventually caused the stricken Norwegian to be stretchered off. That incident led to eight minutes of first half stoppage time, which Uwe Rosler's side almost took full advantage of.
McManaman dribbled infield from the right and ghosted past substitute full back Dean Moxey, before unleashing a fierce right-footed strike which Speroni did well to beat away and keep Palace's half time arrears down to one.
The lively winger was causing the Eagles back four plenty of problems and he came close again seven minutes after the restart. After being slipped in by Watson, he got the better of Moxey but saw his left foot drive flash past the far post.
That sparked Palace into life and after Bannan's in-swinging corner was scrambled off the line by Al Habsi at his near post, the Oman international goalkeeper had to be at his very best to tip a dipping Puncheon volley over the crossbar.
With 25 minutes to go, Pulis changed his front two, throwing on Aaron Wilbraham and Dwight Gayle in place of Jerome and Chamakh – and that change proved to be an inspired one just three minutes later. Bannan's near-post corner was flicked on by Gayle and Wilbraham stretched to stab home the equaliser from six yards.
Palace had their tails up and after Wigan came close to regaining the lead from a corner, the Eagles broke quickly downfield. With his stunning winner at Aston Villa still fresh in the memory, Gayle sprinted down the left before cutting inside and hammering a strike goalwards, but Al Habsi sprung across his goal to parry it away.
The visitors were beginning to sense their first FA Cup fourth round victory since 2010, but the holders were in no mood to give up their trophy without a fight. Substitute Nick Powell drilled a shot wide, before James Perch was denied by Speroni after getting up well to head a Watson free kick goalwards.
Seconds later though, the Latics regained their lead. Espinoza picked the ball up unchallenged in the middle of the park and fed McClean on the left. The former Sunderland man skinned Adrian Mariappa and hit a low strike past Speroni at his near post to send the home fans into raptures.
But it was the travelling red and blue army who were up in arms two minutes from time as Gayle went down in the box under the challenge of another former Eagle Emmerson Boyce – only for referee Mike Jones to wave away the protests.
Palace continued to press for an equaliser in stoppage time but the Latics defence held firm to end the Eagles cup dreams for another season and leave Pulis' side to concentrate on securing Premier League survival.
Wigan Athletic: Al Habsi, Boyce, Watson, Barnett, Perch, Espinoza, McArthur (McCann 80), McManaman (Powell 74), McClean, Beausejour, Maynard (Fortune 74).
Unused subs: Nicholls, Crainey, Gomez, Redmond.
Crystal Palace: Speroni; Mariappa, McCarthy, Delaney, Parr (Moxey 45); Puncheon, O'Keefe, Guedioura, Bannan; Chamakh (Wilbraham 66), Jerome (Gayle 66).
Unused subs: Price, Campana, Boateng, Williams.