Match ends, Crewe Alexandra 1, Barnsley 3.
Championship strugglers Barnsley survived a potential FA Cup shock to win 3-1 at League Two Crewe Alexandra.
Jacob Brown gave them the perfect start, volleying home a third-minute opener.
Crewe goalkeeper Will Jaaskelainen made two good saves to keep the promotion-chasing hosts in it before Paul Green headed an equaliser after the break.
But Conor Chaplin's 75th-minute header and Luke Thomas' late third goal ensured the Championship side progress.
For Barnsley the win was much-needed respite from their league troubles. The Tykes, second from bottom in the Championship, have made it past the third round for the first time since they reached the quarter-finals in 2012-13.
Brown's sublime opener was no more than they deserved following a superb start that saw Crewe keeper Jaaskelainen forced into fine saves to deny Alex Mowatt and Thomas.
For the home side Daniel Powell missed a golden chance to equalise, scuffing a back-post shot wide from six yards with the goal gaping.
Green headed in Crewe's first effort on goal to equalise three minutes after the restart.
But the visitors bounced back well and Clarke Odour was unlucky to see his inswinging free-kick tipped on to the crossbar in the 59th minute.
Chaplin finally put Barnsley in control with 15 minutes remaining before Thomas rolled into an empty net with the last kick of the tie after Jaaskelainen had gone up for a free-kick.
The fourth-round draw will be made live on BBC One on Monday ahead of the Arsenal v Leeds United tie. Coverage starts at 19:30 GMT.
Crewe manager David Artell said in his post-match news conference: "I thought the first half was nip and tuck. We should have gone in 1-1. We got the goal but then after that they have imposed themselves far greater than we have and they have deserved to win in the end.
"It's a disappointing day. I don't think there was much to choose between the two teams at times and then at other times I thought Barnsley did a really good job. We will lick our wounds and go again."
Barnsley first-team coach Matt Rose told the club's website: "The first 15 minutes, we had a game plan and it worked very well.
"We dropped a bit after that and invited them back into the game with too many long balls. There was a spell for five minutes in the second half when they equalised but I think we rode that well and in the end it was quite professional and job done."
- 11AinleySubstituted forFinneyat 82'minutes
- 10KirkSubstituted forDaleat 76'minutes
- 2WilliamsBooked at 90mins
- 5DiabyBooked at 86mins
- 22OduorSubstituted forWilliamsat 78'minutes
- 28Simoes InacioSubstituted forSchmidtat 72'minutes
- James Linington
- Shots on Target
Second Half ends, Crewe Alexandra 1, Barnsley 3.
Goal! Crewe Alexandra 1, Barnsley 3. Luke Thomas (Barnsley) left footed shot from the centre of the box to the centre of the goal. Assisted by Mads Andersen following a fast break.
Jordan Williams (Barnsley) is shown the yellow card for a bad foul.
Daniel Powell (Crewe Alexandra) wins a free kick on the left wing.
Foul by Jordan Williams (Barnsley).
Attempt missed. Conor Chaplin (Barnsley) left footed shot from outside the box is too high from a direct free kick.
Foul by Paul Green (Crewe Alexandra).
Conor Chaplin (Barnsley) wins a free kick in the attacking half.
Bambo Diaby (Barnsley) is shown the yellow card for a bad foul.
Owen Dale (Crewe Alexandra) wins a free kick in the attacking half.
Foul by Bambo Diaby (Barnsley).
Harry Pickering (Crewe Alexandra) wins a free kick in the attacking half.
Foul by Alex Mowatt (Barnsley).
Substitution, Crewe Alexandra. Oliver Finney replaces Callum Ainley.
Substitution, Barnsley. Ben Williams replaces Clarke Oduor.
Attempt saved. Harry Pickering (Crewe Alexandra) right footed shot from outside the box is saved in the centre of the goal.
Substitution, Crewe Alexandra. Owen Dale replaces Charlie Kirk.
Goal! Crewe Alexandra 1, Barnsley 2. Conor Chaplin (Barnsley) header from very close range to the bottom right corner. Assisted by Bambo Diaby following a set piece situation.
Foul by Daniel Powell (Crewe Alexandra).