Liverpool relieved the pressure on manager Rafael Benitez with a morale-boosting victory over Wigan.
David Ngog's glanced header put the Reds ahead, although Liverpool missed several chances to add to their lead.
Jason Scotland volleyed against the crossbar for Wigan as he almost punished Liverpool's profligacy.
Fernando Torres tapped in at the second attempt to seal the win before Charles N'Zogbia scored an injury-time consolation strike for the visitors.
The victory was only Liverpool's fourth in the last 16 games and whether this will be a false dawn like the other wins remains to be seen.
But they moved up to sixth in the league courtesy of a much-needed three points and also marked a special occasion for the club with a determined performance.
Liverpool were celebrating the 50th anniversary since former manager Bill Shankly took over at the club and earned legendary status during nearly 15 years in charge.
Shankly took the club from the old second division - the current Championship - and won three league titles, two FA Cups and a Uefa Cup as he kick-started a golden era in the club's history which saw the Reds go on to dominate in English football and in Europe.
Those memories are in stark contrast to the present team's struggles this season, although the Reds quickly took control against Wigan.
Liverpool were rewarded with a goal after nine minutes when Ngog glanced in a header from Fabio Aurelio's angled cross after ex-Reds keeper Chris Kirkland failed to punch the ball away.
But the Reds are fragile at the back and would have conceded an immediate equaliser had Paul Scharner been more precise with a free header which he could only steer straight at keeper Pepe Reina.
Benitez had insisted beforehand his players were better than their Champions League exit and lowly league position suggested and they were trying to back up his words with actions.
Ngog pulled a ball back for fellow striker Dirk Kuyt and he struck a true close-range shot which Kirkland did well to fend away for a corner.
Then with Wigan clinging on at times, French forward Ngog pounced and angled a drive wide of the far post, yet Liverpool could not get a second goal to give them some breathing space.
Kuyt had a shot blocked following a goalmouth scramble before he got on the end of another Ngog cross only to see his volley brilliantly tipped over by Kirkland.
Liverpool let a lead slip in their 2-1 defeat by Arsenal on Sunday and, even though they showed little sign of capitulating in similar fashion, the home contingent were becoming anxious as the Reds tried to add to their slender lead.
Agger missed a header from a Steven Gerrard corner to add to their supporters worries and those concerns almost turned to despair when Scotland somehow missed a glorious chance.
Wigan deserved something at Anfield - Martinez
Reina failed to punch away a free-kick as he went up with Scharner and Hugo Rodallega, and when the ball fell for Scotland, he could only volley against the crossbar from eight yards.
Wigan kept Liverpool on their guard moments later as Rodallega had a free header blocked but Torres finally relieved the pressure when he scored on his 100th appearance for Liverpool.
He burst clear on the Wigan goal, rounded keeper Kirkland and, despite his initial shot being blocked by Titus Bramble, the Spanish striker picked up the loose ball and tapped in for his 61st goal for the Merseysiders.
N'Zogbia cut across the Liverpool box and fired in a low strike with two minutes to go but the home side held on.