Wigan Athletic climbed out of the bottom three of the Championship for the first time in three months after a 2-1 victory over Brentford that was far more emphatic than the scoreline would suggest.
In doing so, they gave boss Warren Joyce his first points at home at the sixth attempt - avoiding a club-record seventh home league defeat in a row - and breathed new life into their hopes of avoiding the drop.
Sam Morsy opened the scoring on 28 minutes with a fine strike from outside the box after a driving run through the midfield.
The Egypt international had moments earlier hit the inside of the post from a similar position, with Will Grigg narrowly unable to pod home the rebound.
And when Morsy’s cross was bundled over his own line by Bees defender Harlee Dean on 32 minutes, after Grigg had seen a shot snaffled by Bees stopper Daniel Bentley, it was no more than Latics deserved for their enterprising start.
The home side - chasing a third win on the spin in all competitions - had chances to kill off the game but were unable to take them, Michael Jacobs spurning the best of them in the second period.
And they were forced to hang on for an uncomfortable last few minutes after Brentford substitute Jota forced the ball home from close range past Jakob Haugaard, who had earlier pulled off a world-class save to deny Andreas Bjelland.
Anything but a home win would have been an absolute travesty, with Latics showing what they are capable of for the vast majority of an entertaining encounter.
Looking to build on last weekend’s 2-0 win at Burton, Latics had flown out of the blocks, looking to exploit the same supply line that had brought them success in the East Midlands.
Right-back Callum Connolly - the two-goal hero from that game - was again getting forward at every opportunity, seeing one header from a Jacobs corner touched over the bar by the goalkeeper, before sending another off Stephen Warnock’s deep cross straight at goalkeeper Bentley.
The visitors were struggling to gain a foothold in the game, and were lucky not to concede on 26 minutes when Morsy fired against a post, and Grigg couldn’t quite move his feet quickly enough to convert the difficult rebound.
Two minutes later, Brentford weren’t so lucky, when they failed to close down Morsy, who advanced to the edge of the area before smashing a right-foot striker past the helpless goalkeeper.
Within four minutes, it was 2-0, and again Morsy was heavily involved.
Bentley initially did well to prevent Grigg netting from close-range, but Jacobs won the ball back with impressive tenacity to feed Morsy.
The midfielder should really have pulled the trigger himself from 10 yards, but he elected instead to try to cross inside towards Grigg, only for centre-back Dean to get in the way and divert the ball over his own line.
Grigg was almost in again moments later when Warnock’s cross from the left was only just in front of the stretching striker, and the visitors would have been very relieved to get into the sheds at half-time only two goals down.
They briefly rallied at the start of the second period, with John Egan and Lasse Vive sending efforts just wide of the mark.
When they did finally have a worthwhile effort on target, a Bjelland header from eight yards, Haugaard pulled off a stupendous save, diving to his right, to tip it over the bar.
Jacobs created, and then squandered, a great chance to make the game safe, firing wide from bang in front of the goal after cutting in cleverly from the right.
Shaun MacDonald, too, ought to have done better when, having done all the hard work, dragged a left-foot shot from the edge of the box wide of the far post.
Latics were almost made to pay for their profligacy at the death, with substitute Jota reducing the arrears with four minutes remaining, after Haugaard was unable to hold on to Philipp Hofmann’s volley.
But the home side - with the late additions of Ryan Tunnicliffe and Craig Morgan off the bench - were able to play out time to complete another huge step in their fight against an immediate return to League One.