Match ends, Wigan Athletic 3, AFC Fylde 2.
Will Grigg scored two late goals as Wigan booked an FA Cup third-round trip to Premier League side Bournemouth by beating National League side AFC Fylde.
The visitors had led 2-1 with 10 minutes remaining thanks to Simon Grand's close-range finish and Danny Rowe's deflected shot off the post.
But Grigg converted from Gary Roberts' cross and then flicked the ball past Jay Lynch four minutes later.
Callum Elder had earlier set up Ivan Toney for the first goal of the game.
The two sides had drawn 1-1 at Fylde 11 days ago and it was the Latics, FA Cup winners in 2013, who were on the back foot in the opening stages as Rowe and Jonathan Smith went close for the visitors.
Fylde, who were in the 11th-tier West Lancashire League 11 years ago, roared back after trailing to a neat finish from 21-year-old Toney, who is on loan at Wigan from Newcastle United.
But just when it looked like a shock was on the cards, Grigg - who scored in the original tie at Fylde - netted twice in four minutes to secure victory for the League One leaders.
- 18RobertsSubstituted forDunkleyat 87'minutes
- 11MasseySubstituted forHuntat 73'minutes
- 27ColcloughSubstituted forGriggat 61'minutes
- 8FinleyBooked at 74mins
- 6BondSubstituted forBlinkhornat 85'minutes
- 21EzeweleSubstituted forMuldoonat 54'minutes
- Ross Joyce
- Shots on Target
Second Half ends, Wigan Athletic 3, AFC Fylde 2.
Attempt saved. Matthew Blinkhorn (AFC Fylde) header from the centre of the box is saved in the centre of the goal.
Corner, AFC Fylde. Conceded by Ivan Toney.
Attempt blocked. Danny L. Rowe (AFC Fylde) right footed shot from the left side of the box is blocked.
(AFC Fylde) wins a free kick in the attacking half.
6-second violation by Matija Sarkic (Wigan Athletic).
Attempt blocked. Danny L. Rowe (AFC Fylde) right footed shot from outside the box is blocked.
Foul by Noel Hunt (Wigan Athletic).
Johnny Smith (AFC Fylde) wins a free kick in the defensive half.
Corner, AFC Fylde. Conceded by Noel Hunt.
Corner, AFC Fylde. Conceded by Nathan Byrne.
Foul by Cheyenne Dunkley (Wigan Athletic).
Johnny Smith (AFC Fylde) wins a free kick on the right wing.
Max Power (Wigan Athletic) wins a free kick in the attacking half.
Foul by Jack Muldoon (AFC Fylde).
Substitution, Wigan Athletic. Cheyenne Dunkley replaces Gary Roberts.
Attempt missed. Ivan Toney (Wigan Athletic) left footed shot from the left side of the box is too high.
Substitution, AFC Fylde. Matthew Blinkhorn replaces Andy Bond.
Ivan Toney (Wigan Athletic) wins a free kick in the defensive half.