Match ends, Barnet 3, Brentford 3.
Barnet 3-3 Brentford in FA Cup fourth round at The Hive
Dan Sparkes' brilliant free-kick earned non-league Barnet an FA Cup fourth-round replay against Brentford after they twice fought from a goal down.
Ollie Watkins' long-range strike gave Brentford the lead before Shaq Coulthirst scored twice in three second-half minutes.
Neal Maupay made it 2-2 from the spot although it appeared David Tutonda had not fouled Watkins in the area.
Sergi Canos fired home as Brentford led again before Sparkes' stunning effort.
Barnet or Brentford will be away at Championship side Swansea in the next round.
There were 38 efforts on goal and the woodwork was struck three times during a thrilling contest between two sides with 71 places between them in the league pyramid.
Barnet, who are looking to become only the third non-league side in five seasons to reach the fifth round, were forced to defend for much of the opening period.
Yoann Barbet saw his glancing header come off the near post and right-back Moses Odubajo hit the other upright with a curling shot from 20 yards.
Championship side Brentford also found another obstacle in 6ft 3in centre-back Dan Sweeney who made two great tackles to deny French striker Maupay.
Barnet keeper Will Huffer was finally beaten when Watkins - linked with a move to Southampton - surged forward and struck a 20-yard shot that crept inside the near post.
Roared on by many of 6,000-strong crowd inside The Hive, the north London side fought back superbly after the interval.
Coulthirst, who was the hero against Sheffield United in the previous round, made it 1-1 five minutes after the break when he toe-poked home following good work by Ephron Mason-Clark on the right.
And three minutes later, the game turned in Barnet's favour when the former Tottenham youth player thrashed home after Brentford failed to clear their area.
Darren Currie's side were in the ascendancy but were then dealt a blow when referee Andy Madley, brother of Bobby, pointed to the spot after he deemed Tutonda to have brought down Watkins. However, the TV replay showed there was no contact between the pair.
Maupay made no mistake from the spot.
The momentum was back in Brentford's favour, and they once more took the lead when Spaniard Canos finished off the slick move which started deep in midfield.
But there was to be one more twist as Sparkes - signed from Dagenham & Redbridge in the summer - had been on the pitch for only five minutes when he took responsibility for a free-kick on the left of the area and fired an unstoppable effort in off the bar.
Odubajo hit the woodwork with another effort late in the game as Brentford tried to avoid a replay, but Barnet clung on.
'Watkins apologised to Tutonda'
After the game, Barnet boss Currie said Watkins had apologised for his role in the second-half penalty incident.
"Watkins apologised to Tutonda," he said. "That tells me everything I need to know."
Currie added: "I am proud of the players and their performance. We were nearly there with the result.
"Both teams will say they had chances, but the buzz around the place when we went in front is memorable.
"The players feel they should have won the game, we went toe-to-toe and every single one of them was excellent."
Brentford boss Thomas Frank was critical of his side's defending in the match.
"Big credit to Barnet because they did everything they could to create a tough game," he told BT Sport.
"We had enough chances to kill the game and when you do not take them, we cannot win a game like this. We gave too many soft goals away.
"We definitely did not underestimate them. I don't know what happened, but it was way too open."
- 18FonguckSubstituted forSparkesat 70'minutes
- 21ElitoSubstituted forBoucaudat 90+1'minutes
- 2OdubajoBooked at 38mins
- 14Da SilvaSubstituted forSawyersat 61'minutes
- 3HenrySubstituted forDalsgaardat 70'minutes
- 11WatkinsSubstituted forBenrahmaat 79'minutes
- 34Bech Sörensen
- Andy Madley
- Shots on Target
Second Half ends, Barnet 3, Brentford 3.
Offside, Brentford. Romaine Sawyers tries a through ball, but Henrik Dalsgaard is caught offside.
Corner, Brentford. Conceded by Craig Robson.
Substitution, Barnet. Andre Boucaud replaces Medy Elito.
Attempt blocked. Julian Jeanvier (Brentford) right footed shot from the centre of the box is blocked. Assisted by Said Benrahma with a cross.
Corner, Brentford. Conceded by Craig Robson.
Attempt saved. Sergi Canos (Brentford) left footed shot from the centre of the box is saved in the centre of the goal.
Moses Odubajo (Brentford) hits the left post with a right footed shot from the left side of the box.
Attempt saved. Said Benrahma (Brentford) right footed shot from outside the box is saved in the centre of the goal. Assisted by Neal Maupay.
Foul by Neal Maupay (Brentford).
Elliott Johnson (Barnet) wins a free kick in the defensive half.
Attempt missed. Said Benrahma (Brentford) right footed shot from outside the box is close, but misses to the right.
Delay over. They are ready to continue.
Delay in match Yoann Barbet (Brentford) because of an injury.
Attempt missed. Ezri Konsa Ngoyo (Brentford) right footed shot from the centre of the box is close, but misses the top left corner. Assisted by Yoann Barbet following a corner.
Attempt blocked. Sergi Canos (Brentford) right footed shot from the centre of the box is blocked.
Corner, Brentford. Conceded by William Huffer.
Attempt saved. Neal Maupay (Brentford) left footed shot from the centre of the box is saved in the top centre of the goal. Assisted by Said Benrahma.
Substitution, Brentford. Said Benrahma replaces Ollie Watkins.
Julian Jeanvier (Brentford) wins a free kick in the defensive half.
Foul by Shaquile Coulthirst (Barnet).
Attempt blocked. Henrik Dalsgaard (Brentford) header from the centre of the box is blocked. Assisted by Moses Odubajo with a cross.
Goal! Barnet 3, Brentford 3. Dan Sparkes (Barnet) from a free kick with a left footed shot to the top left corner.
Foul by Ezri Konsa Ngoyo (Brentford).
Shaquile Coulthirst (Barnet) wins a free kick in the attacking half.
Goal! Barnet 2, Brentford 3. Sergi Canos (Brentford) right footed shot from the centre of the box to the centre of the goal. Assisted by Henrik Dalsgaard.
Foul by Romaine Sawyers (Brentford).
Ephron Mason-Clark (Barnet) wins a free kick in the defensive half.
Substitution, Barnet. Dan Sparkes replaces Wesley Fonguck.
Substitution, Brentford. Henrik Dalsgaard replaces Rico Henry because of an injury.
Corner, Brentford. Conceded by Cheye Alexander.
Attempt blocked. Ollie Watkins (Brentford) left footed shot from the left side of the box is blocked. Assisted by Moses Odubajo with a cross.
Attempt saved. Shaquile Coulthirst (Barnet) header from the centre of the box is saved in the centre of the goal. Assisted by Cheye Alexander with a cross.
Corner, Barnet. Conceded by Julian Jeanvier.
Substitution, Brentford. Romaine Sawyers replaces Josh Da Silva.
Goal! Barnet 2, Brentford 2. Neal Maupay (Brentford) converts the penalty with a right footed shot to the bottom left corner.
Penalty Brentford. Ollie Watkins draws a foul in the penalty area.
Penalty conceded by David Tutonda (Barnet) after a foul in the penalty area.
Attempt saved. Neal Maupay (Brentford) right footed shot from the right side of the six yard box is saved in the centre of the goal.