Leon Legge scored a stoppage time winner as Brentford beat Tranmere Rovers 2-1.
It looked as if The Bees would have to settle for a point after they took an early lead through Charlie MacDonald but Tranmere levelled midway through the second half with a superb long-range effort from Josh Labadie.
The visitors may have felt hard done by and some neutral judges may have considered a draw a fair result but Brentford kept going to the end and won it in the dying seconds.
The game kicked off 15 minutes late due to traffic congestion and that affected the numbers inside Griffin Park, particularly in the early stages, but it did not affect the teams, who put on a decent spectacle, particularly until the visitors equalised.
Brentford started brighter and Tranmere had barely had a touch before The Bees took the lead inside 80 seconds.
Rovers would have been unhappy with the goal, no-one put any pressure on Robbie Neilson when a corner was cleared and he picked out Sam Saunders on the left, again there was no pressure as he floated the ball in to meet MacDonald's near post run and the striker flicked a header in off the far post.
Toumani Diagouraga almost made it two when he and Marcus Bean led a break forward, the ball eventually broke Diagouraga but he lashed into the side netting from a tight angle.
Saunders stung the palms of Tranmere goalkeeper Tony Warner from 25 yards soon after as Brentford threatened to run riot, but the visitors grew into the game.
Lucas Akins headed wide at the far post under pressure and Labadie saw a shot fade wide from 20 yards.
Warner palmed away an Osborne header and then saved well when Diagouraga lashed in a powerful effort from the edge of the box but Tranmere had the better of the chances in the middle period of the first half.
Richard Lee got down to brilliantly turn away a low Aaron Cresswell free kick and Osborne cleared away when Enoch Showunmi was first to a corner.
From another Cresswell delivery the ball fizzed low to the edge of the box and after two dummies Akins' low shot was heading for the net before Osborne blocked.
Brentford could have scored a second after a move that included around 25 passes ended with Weston heading through to Saunders but the right winger shot across the face of goal and Alexander was just unable to reach it.
Tranmere had the first sight of goal after the re-start, Lee saving well from Labadie, before MacDonald had a snap shot blocked and Saunders saw a curling shot deflected over.
Akins could perhaps have done better than head straight Lee from an Ian Goodison cross but the Bees goalkeeper almost presented Showunmi with an equaliser when he threw the ball straight to him, however he was reprieved as the shot was lashed over the top.
Tranmere could have levelled when they won the ball in the centre of the field and Showunmi fed the onrushing Labadie but Lee was alert and saved at his feet.
The second half was pretty even in general, Tranmere pressed forward for a winner but Brentford still had attacking intentions and there was plenty for spectators to enjoy.
And Tranmere got the goal they had been threatening with 25 minutes remaining.
Goodison interrupted a Brentford breakaway and with Bean lying prone in the Bees area, Labadie let fly from 25 yards and the ball arrowed past Lee and into the top corner.
Both team pressed for a winner in the last quarter - Warner saved well from a placed Bean effort and Akins missed the target with a volley - but as the minutes ticked on the chances became fewer and further between and the game more stop-start with referee Pat Miller blowing his whistle regularly.
Tranmere came close to a winner when Lateef Elford-Alliyu, who had been kept quiet by débutante Neilson, cut inside and shot wide at the near post.
And Osborne went even closer when he met a Saunders corner but headed narrowly past the post.
Lewis Grabban had a shot deflected into the side netting in stoppage time and from the resulting corner, Brentford won it.
Again the corner was cleared and Saunders picked it up on the left, he lifted it to the far post and Legge rose highest to head powerfully in and send the Brentford faithful home happy.
Brentford: Lee; Neilson, Legge, Osborne, Woodman; Saunders, Bean, Diagouraga, Weston (sub Grabban 80 mins); MacDonald (sub Simpson 73 mins), Alexander
Subs (not used): Moore, Balkestein, Byrne, Tudur Jones, Bignall
Bookings: Simpson (90 mins)
Tranmere Rovers: Warner; Kay, Goodison, McChrystal, Cresswell (sub Bakayogo 32 mins); Welsh, Taylor, Labadie (sub Weir 73 mins); Akins, Showunmi, Elford-Alliyu
Subs (not used): Collister, Cathalina, Robinson, Wood, McGurk
Bookings: Labadie (44 mins), Akins (63 mins), Kay (85 mins)
Attendance: 4,192 (220 away fans)
By Chris Wickham