Michael Jacobs struck in stoppage time as Wigan got their League One promotion bid back on track with a 1-0 win at Bradford.
Jacobs slotted into the bottom corner to settle a scrappy game in the first minute of added time and moved the Latics back into the top two.
Simon Grayson finally took charge of his first home game a month after being named Bradford manager but his side’s winless league run stretched to nine matches.
Wigan, who named top-scorer Will Grigg on the bench ahead of Sunday’s FA Cup quarter-final with Southampton, always looked the more likely winners.
Nick Powell’s good work down the left led to James Vaughan hitting the right post before Nathan Byrne’s cross was clawed away by Colin Doyle.
Powell headed over from Gavin Massey’s cross while Vaughan missed the target from Byrne’s fine ball from the right.
At the other end Tyrell Robinson’s cross made its way to Tony McMahon, who could not keep his effort down.
Wigan suffered a blow ahead of their FA Cup tie when Powell was forced off in the second half after suffering a knock.
Grigg was brought on in his place and the Northern Ireland striker played a key role in the winner, flicking on for Jacobs to race clear and earn Wigan a first win in three games.