Melbourne Stars qualified for the semi-finals of the Big Bash League with a 13 run win over rock bottom Sydney Thunder.
The hosts posted 145-8 from their 20 overs, with Brad Hodge and David Hussey top-scoring on 39 and 32 respectively, while Chris Gayle took two late wickets.
In reply, the Thunder threw away a great chance to post their first victory in this year's tournament, needing just 39 runs from 30 balls with five wickets remaining.
Skipper Gayle had put the visitors into a strong position, hitting 65 from just 43 balls, including four sixes and six fours, before being caught by Glenn Maxwell off Dmitri Mascarenhas to leave the score at 91-3.
Tight bowling and fielding left Thunder needing 24 runs from 10 balls before Gurinder Sandhu hit a two and a four off John Hastings to leave the visitors needing an improbable 18 off the last over.
So it proved, with Sandu and Luke Doran being caught off the final over from James Faulkner, who finished with 3-24 as Thunder were all out with two balls to spare.
The result sees the Stars post their fifth win of the competition and join rivals Melbourne Renegades in the last four.