Gloucester kept their hopes of European Champions Cup qualification alive with a narrow 39-30 win over Sale at Kingsholm.
The bonus-point victory took Gloucester to within one point of both Harlequins and Northampton in the Premiership table and they will need to overtake at least one of those rivals in the remaining two games to stand any chance of qualifying.
It will not be an easy task as those games are tough assignments with a visit to Bath before a concluding fixture at home to high-flying Exeter.
Gloucester made hard work of winning but ultimately triumphed as Tom Marshall scored two tries with Henry Trinder, Billy Twelvetrees and Richard Hibbard one apiece. Billy Burns converted four and added two penalties.
Battling Sale had tries from Sam James, Mike Phillips, Kieran Longbottom and Byron McGuigan. AJ MacGinty converted two and kicked two penalties.
Gloucester looked to have taken a fourth-minute lead when Trinder crossed after a run from Jonny May had put the Sale defence on the back foot. However the try was ruled out by the TMO as an earlier knock-on from Burns was easily spotted.
The home side would not be denied for long, for they went ahead eight minutes later when a clever pass from Mark Atkinson allowed May and Marshall to combine for the full back to score the opening try.
From the restart, Sale immediately drew level when Mariano Galarza failed to collect the kick and a strong burst from Cameron Neild set up a try for James.
Worse was to follow for Gloucester when they soon gifted their opponents a second try. They lost a line-out on half-way to allow Phillips to kick ahead and when Marshall failed to usher the ball into touch, the scrum half was up in support to collect from Ben Curry and race over.
MacGinty was off-target with the conversion before Burns missed a straightforward penalty so Gloucester trailed 12-7 at the end of the first quarter.
Sale picked up an injury blow when prop, Halani Aulika, departed with an arm injury before suffering a further setback as Gloucester scored their second try when Hibbard finished off a line-out drive. Burns missed the conversion but his successful penalty gave his side a 15-12 advantage at the interval.
Within 90 seconds of the restart, Sale went in front when elusive runs from James and MacGinty created a try for replacement prop Longbottom.
Soon after, Hibbard left the field to be replaced by Motu Matu'u and Gloucester's nightmare start to the second-half continued when Nield and Ross Harrison made the running for Sale's bonus point try scored by McGuigan.
Gloucester reacted by bringing on Ben Morgan at No 8 in place of Premiership debutant, Freddie Clarke, and it paid dividends as Atkinson set up the home side's third try scored by Trinder.
Burns converted but his side still trailed 24-22 at the end of the third quarter and when Atkinson was penalised for not releasing, Gloucester fell further behind to a MacGinty penalty.
With 15 minutes remaining, Harrison was yellow carded for a deliberate off-side and the game swung Gloucester's way. Marshall went outside Denny Solomona for his second and the bonus point before replacement Twelvetrees galloped 20 metres to seal victory with Gloucester's fifth.
A late penalty from MacGinty looked to have secured Sale a second bonus point but Burns took that away with a last-minute penalty.
Gloucester (15) 39
Tries: Marshall 2, Hibbard, Trinder, Twelvetrees Cons: Burns 4 Pens: Burns 2
Sale (12) 30
Tries: James, Phillips, Longbottom, McGuigan Cons: MacGinty 2 Pens: MacGinty 2