Cardiff City continued their unbeaten start under interim boss Mark Hudson with victory at Wigan Athletic, who remain winless at home this season.
Callum Robinson fired Cardiff into an early lead from Niels Nkounkou's pass.
Nkounkou was involved again in a slick second-half counter-attack which Sheyi Ojo finished from close range.
Wigan's Charlie Wyke headed in with seven minutes left but Ryan Wintle sealed Cardiff's victory with a stunning free-kick in added time.
They now have two wins and a draw since Hudson took charge temporarily after Steve Morison's sacking last month.
The Bluebirds climb up to 10th place in the Championship table - three points adrift of the play-off spots - while Wigan slip to 16th.
The Latics came into this game with the best away record in the Championship but the worst at home.
Their hopes of a first victory at the DW Stadium were dealt an early blow when, after kick-off was delayed by seven minutes for no apparent reason, Cardiff took a seventh-minute lead.
Left-back Nkounkou created the goal with a well-measured pass for Robinson, who scored his second goal for the Bluebirds with a fine finish beyond former Cardiff goalkeeper Ben Amos.
Wigan looked to hit back with another ex-Bluebird, Josh Magennis, playing a dangerous cross which evaded everyone in the penalty area and Will Keane dragging a shot wide.
The home side appealed for a penalty when Wyke went down after a challenge from Jack Simpson, but referee James Bell ignored their protests.
Mark Harris had a chance to double Cardiff's lead but shot wide when a pass to the unmarked Robinson looked like the better option.
The Republic of Ireland international was clearly annoyed not to receive the ball, and his frustration was compounded by an injury which forced him off before half-time.
Robinson's departure did not derail Cardiff's attacking efforts as they created several chances after the break, with Callum O'Dowda and Perry Ng threatening.
Hudson's side doubled their lead with a clinical counter-attack as Nkounkou found O'Dowda, whose pinpoint cross was converted by Ojo.
Cardiff thought they had a third goal courtesy of Wintle, but the midfielder was flagged offside.
They looked to be coasting to victory but, with seven minutes left, Wykes nodded in from Tom Naylor's cross to set up a nervy finish.
Wigan substitute Nathan Broadhead fired wide as the hosts applied late pressure in added time.
Cardiff's defending became increasingly desperate but they settled their anxiety as Wintle curled in a superb free-kick.
The visitors had chances to extend their lead deeper into injury time, with substitutes Kion Etete and Ojo missing glorious opportunities, but it did not matter as Cardiff maintained their upward trajectory under former captain Hudson.
Wigan Athletic: Amos, Kerr, Whatmough, Bennett (Naylor 71'), Darikwa (Tilt 71'), Power, Shinnie, McClean (Scully 81'), Keane, Magennis (Broadhead 71'), Wyke.
Subs not used: Tickle, Aasgaard, Fletcher.
Cardiff City: Allsop, Ng, Kipré, Simpson, Nkounkou, Wintle, Ralls (Sawyers 77'), Rinomhota, O'Dowda (Nelson 87'), Robinson (Ojo 41'), Harris (Etete 77').
Subs not used: Alnwick, Sang, Philogene.