FA Cup holders Wigan kept up the defence of their crown by knocking Premier League Cardiff out to move into the last eight.
Chris McCann turned in a low cross to put the Championship side ahead before Fraizer Campbell lashed in a leveller.
Midfielder Ben Watson restored Wigan's lead before half-time with a 25-yard piledriver following a free-kick.
Cardiff's Juan Cala was denied by a post while Craig Noone had a late shot saved as the hosts bowed out.
Clive AllenBBC Radio 5 live
"As FA Cup holders, Wigan are certainly showing plenty of resilience in the defence of the trophy. Wigan manager Uwe Rosler got it right tactically and his players have put the work in. A fantastic performance from the holders."
The home side, who are second-from-bottom in the Premier League, pushed plenty of players forward to try to equalise only for a determined rearguard Latics action to keep them at arm's length for the most part.
Wigan were playing their 42nd match of a season which has included Europa League football on the back of beating Manchester City in last season's FA Cup final, but took another Premier League scalp having beaten Crystal Palace in the last round.
It was the first time the team had played each other in the FA Cup but there was plenty of history between the two managers.
Cardiff boss Ole Gunnar Solskjaer played at Manchester United, while his counterpart Uwe Rosler was at rivals Manchester City during their playing days.
Rosler was also caretaker manager at Molde before Solsjkaer became the Norwegian club's full-time manager, and the two friends also met for a chat at a hotel the night before the match.
However, any sentiment was put one side as the visitors began the stronger and were rewarded when they took the lead.
Midfielder Jordi Gomez fired in a low cross for McCann, who did well to deal with the pace of the ball and sidefoot in a left-foot finish.
Cardiff had struggled to impose themselves but were level when winger Wilfried Zaha slipped in the area and, after Wigan failed to clear, Campbell powered in a left-foot strike.
The pattern of the game had seen both teams score against the run of play and that continued when Watson, who scored the winner in last year's final against City, thundered a strike past keeper David Marshall after a free-kick had been rolled into his path.
The goals opened up the game into an absorbing spectacle and Cala looked set to level for Cardiff but his header from a yard hit the post.
McCann almost scooped in an effort for the visitors but that was a rare chance as the second half failed to match the entertainment of the first.
Cardiff rarely threatened to get back on level terms apart from in a frantic finish when Noone cut in from the right and had his shot palmed wide by Wigan keeper Ali Al Habsi.
Cardiff manager Ole Gunnar Solskjaer:
"We are disappointed. If you look at the game in terms of possession and chances we should have won but we didn't score the goals.
"It gives us a blow. You don't want to lose games as you suffer a little bit of a confidence dip but the way I was made was that when you want to lose a game you want to bounce back as a player.
"Knowing these lads, they are probably made from the same stuff I am.
"I wish Uwe all the best."
It took Wigan eight hours to get to Cardiff on Friday after their flight was cancelled and Wigan boss Uwe Rosler said:
"The longer the game went, we got a little bit tired.
"After the big disruption with the travel I have to give my players a massive compliment that they held out.
"I'm delighted with effort and performance. We showed our supporters, who came in big numbers, that we meant business and we really care to be the FA Cup holder and want to go as far as we can in the competition."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.