Ali Coote scored a free-kick in the first half before a Brentford trialist added a second after the break. United fought back and snatched a win with a goal in the 89th minute of the game.

The Stones nearly had a goal in the opening minutes as Shamir Mullings broke through one-on-one. Jarvis Edobor managed to put enough pressure on and put the striker off his shot, which rolled tamely to Patrik Gunnarsson.

Joe Hardy had Brentford’s first real chance after three minutes, taking aim from distance and watching the goalkeeper collect his effort in mid-air.

Maidstone went close twice more in the opening 10 minutes, the first coming when Andre Coker hit a low shot that forced Gunnarsson to tip the ball wide. From the resulting corner Mullings got up to head the ball narrowly wide of goal.

Next up Bees captain Coote had a go from range, getting on the end of a cross from Lukas Talbro. The effort was wild and found the top corner of the stand.

For the next quarter of an hour, Maidstone had all the running of the game. Coker produced chances for Mullings and Will De Havilland within the space of five minutes. The first was nodded to Gunnarsson and the second was headed wide.

With 34 minutes gone, Stones fans were off their seats as Jack Richards saw an effort crack off the post. He had connected with a volley after a cross from Michee Efete but it rebounded out.

Four minutes later, Brentford B took the lead. A free-kick was conceded on the edge of the box and Coote stepped up to clip it into the right side of the net.

Just before the break, Edobor had a chance when he nodded down a corner kick. Jack Paxman was on hand for Maidstone to smash away a clearance on the line.

At half-time, the hosts made three changes. Their goalkeeper was swapped out for a trialist. Within minutes, the new stopper was picking the ball out of his net.

Coming too far off his line as one of the trialists headed towards goal, he regretted it instantly. The trialist lifted his shot over the top of him and it dipped just under the crossbar on its way in.

There was almost a third for The Bees moments later. Coote had an effort blocked on the edge of the box and then Hardy drilled the rebound inches over the woodwork.

After 57 minutes, the home side were back in the game. Brentford gave away the ball cheaply at the back, allowing Mullings a free route towards goal. He took full advantage, taking his time over a shot that he drilled low into the bottom left corner of the net.

Four minutes later, with just over an hour gone, Maidstone were level. Substitute Ollie Muldoon struck a free-kick from 25 yards that clipped the crossbar and bounced down. It might have crossed the line but it didn’t matter, Coker finished it off as it came back off the line.

Paxman was the next Stones player to go close, he hit the post after the ball had been cut back to him on the six-yard box by Michael Phillips.

The B squad were struggling for chances as time went on. Hardy looked ready to pounce on a through ball from Coote after 74 minutes, but the assistant had raised his flag for offside. A few minutes later, Kolbeinn Finnsson had a wild attempt as his shot sailed over the bar from the edge of the box.

Jamar Loza threatened to put his team ahead throughout the final quarter of an hour. His first chance came from inside the box, which needed a great reaction stop from Gunnarsson to keep it out.

Soon after, he struck one from the edge of the box and it dropped agonisingly close to the crossbar.

Eight minutes from time, Hardy nearly had a winner against the run of play. A rash clearance from the Maidstone goalkeeper cannoned off Hardy, and the striker burst after it. He controlled it, took a touch and drilled it low only for the keeper to recover and parry away the chance.

A minute from the end, Loza got the goal his play had deserved. A deep corner kick had The Bees at sixes and sevens. The ball was being knocked around in the six-yard box, and Loza pounced from close range to knock home the winner.

Maidstone United: Funnell (sub Trialist-GK 45); Efete (sub Capel 58), De Havilland, Finney (sub Arthur 45), Twumasi (sub Kenny 78); Wynter (sub Phillips 63), Lewis (sub Muldoon 45); Coker (sub Loza 63), Paxman, Richards (sub Ajiboye 68); Mullings (sub Quigley 68)

Brentford B: Gunnarsson; Talbro, Trialist-CB, Edobor, Chatzitheodoridis; Mitchell, Coote, Finnsson; Titov, Hardy, Trialist-FW (sub Trialist-FW 61)