Matt Smith grabbed four goals as Bristol City fought back to beat Gillingham in a thrilling Johnstone's Paint Trophy area final first leg and take a big step towards Wembley.
Cody McDonald fired the hosts ahead but two Smith headers from Jay Emmanuel-Thomas crosses saw City lead.
On-loan striker Smith's third came with a cheeky backheel after the break.
And although McDonald raced through for a second time to make it 3-2, Smith's stunning volley sealed an emphatic win.
The two-goal lead for next month's second leg at Ashton Gate was deserved after an impressive display by the League One high-flyers which puts them within reach of a Wembley final against either Preston or Walsall on 22 March.
|A City treble in Kent|
|This was Bristol City's third victory at Priestfield Stadium this season, having previously beaten Gillingham in the league and FA Cup.|
But McDonald's early opener, which squirmed under away goalkeeper Frank Fielding, suggested a difficult evening against a side who sacked manager Peter Taylor on New Year's Eve and are struggling at the other end of the same division.
However, from the moment Fulham forward Smith, who has now scored seven goals in six starts for City, headed in after some great work by Emmanuel-Thomas the visitors looked in control.
A classy header made it 2-1 at the interval and Smith's hat-trick was sealed with a cute finish from a Scott Wagstaff cut-back.
McDonald ran through to fire his side's second but Smith's sensational, dipping volley restored the two-goal advantage for the two-time winners of the competition.
Bristol City manager Steve Cotterill told BBC Radio Bristol:
"Some of our attacking play was fantastic but it's been like that all season.
"A couple of our defensive lapses you can't be happy with but all in all, we have to be pleased with the performance.
"Some of the service Smith had was fantastic. I know he's got to take those chances, and he certainly did.
"We're pleased we've got him. He's a great lad and has integrated very well."
- 31HoyteBooked at 87mins
- 3MartinBooked at 34mins
- 8HessenthalerBooked at 29mins
- 21DoughtySubstituted forMcGlashanat 65'minutes
- 24DickensonSubstituted forNorrisat 59'minutes
- 11WagstaffSubstituted forLittleat 78'minutes
- 17CunninghamSubstituted forBryanat 87'minutes
- 10Emmanuel-ThomasSubstituted forElliottat 81'minutes
- Andy D'Urso
- Shots on Target