Liverpool captain Steven Gerrard fired a stunning stoppage-time winner to floor Middlesbrough after they threatened an Anfield shock.
England head coach Fabio Capello suggested in midweek that Gerrard is not fully fit, but he was still going strong late in the game against Boro as Liverpool came from behind to claim three points.
Boro had not won in the league at Anfield since 1976, and when Mido came off the bench to put them ahead with 20 minutes left that record looked likely to be consigned to history.
But Jamie Carragher saw a 20-yard cross-shot deflect home off Emanuel Pogatetz for an own goal with five minutes of regulation time remaining, and then Gerrard rifled home a 20-yard winner deep into injury-time.
Liverpool replaced the injured Sami Hyypia with Martin Skrtel in defence for the match, while Gerrard shrugged off worries over a groin problem to start in a match which saw Robbie Keane and Andrea Dossena make their home league debuts.
Middlesbrough boss Gareth Southgate initially named the side which beat Tottenham last week, with new signing Justin Hoyte on the bench.
But a pre-match injury to goalkeeper Brad Jones meant Ross Turnbull was thrust into action at the last moment.
He was put under immediate pressure by Liverpool. After three minutes Fernando Torres surged towards the penalty area and fed Dirk Kuyt whose fierce drive was turned aside at full stretch by Turnbull.
Then Dossena fired over a swirling cross-shot which Turnbull pushed behind.
Torres saw a flicked header go wide before there was a lengthy delay when Dossena and Jeremie Aliadiere clashed heads, both leaving the field.
Boro's French forward returned with his head heavily bandaged, while Dossena needed a stitch before being allowed back into the fray.
It then took a fine flying save from Jose Reina to touch over an 18-yard shot from Boro's Andrew Taylor.
Tuncay and Afonso Alves gave Liverpool central defenders Carragher and Skrtel plenty to think about before Gerrard almost scored at the other end when his dipping drive flashed just over, following neat build-up play between Torres and Kuyt.
Middlesbrough's England winger Stewart Downing, a possible target for Liverpool, cut inside two defenders from the left before sending a shot just wide of the far post.
The pace barely dropped, and only fine defending by David Wheater twice stopped Torres in the box, the second time after the Spaniard had been put clear by Kuyt.
Torres should then have given Liverpool a half-time lead but his shot was deflected wide by Emanuel Pogatetz.
Boro sent out Turnbull for a half-time warm-up in front of the Kop, the goal the visitors were due to defend in the second period.
But despite having the majority of possession, Liverpool were not making clear chances.
All the effort in the world was there from Keane and Kuyt, but Boro's defence was standing firm.
Liverpool's set-plays were weak and ineffective, and corners in particular were repeatedly wasted.
Boro sent on Mido for Alves on the hour mark, the Teesside club clearly believing they could get something out of the game.
And they almost took the lead after 62 minutes when Mido crossed from the left and Tuncay produced a clever turn and flick before forcing Reina into a sharp save.
Liverpool sent on Ryan Babel, fresh from his Olympic campaign with Holland, in place of Yossi Benayoun after 65 minutes.
Torres immediately went close with a 25-yard strike, but it was Boro who grabbed the lead after 70 minutes.
Xabi Alonso conceded possession and the ball was switched from Aliadiere to Mido, some 30 yards out. His fierce, low drive beat Reina and found the bottom right corner.
Liverpool replaced Dossena with Fabio Aurelio, with Boro sending on Hoyte for Taylor.
Keane was booked for dissent after Liverpool were denied a penalty when Gerrard's fierce drive was deflected wide, seemingly off a Middlesbrough player's arm.
Then Mido found his way into referee Mike Riley's book for time-wasting.
Liverpool sent on Nabil El Zhar for Arbeloa with seven minutes left and they finally managed to pile on the pressure.
They drew level when Carragher made the most of Riley playing an advantage after a shot from Alonso hit Gary O'Neil's arm.
Amid loud appeals for a spot-kick, Carragher unleashed a shot which looked to be going off target but deflected past the unlucky Turnbull off Pogatetz.
Turnbull made a fine save from a Gerrard free-kick in injury-time. But in the fourth minute of added time, Liverpool's talisman smashed home the winner, driving the ball into the right corner of the net from the edge of the penalty area after Wheater's poor defensive header.
Teams:
Liverpool: Reina, Arbeloa (El Zhar 83), Carragher, Skrtel,Dossena (Aurelio 75), Kuyt, Gerrard, Alonso,Benayoun (Babel 65), Keane, Torres.
Middlesbrough: Turnbull, Wheater, Huth, Pogatetz,Taylor (Hoyte 75), Aliadiere, O'Neil, Shawky, Downing,Alves (Mido 60), Sanli (Digard 87).
England head coach Fabio Capello suggested in midweek that Gerrard is not fully fit, but he was still going strong late in the game against Boro as Liverpool came from behind to claim three points.
Boro had not won in the league at Anfield since 1976, and when Mido came off the bench to put them ahead with 20 minutes left that record looked likely to be consigned to history.
But Jamie Carragher saw a 20-yard cross-shot deflect home off Emanuel Pogatetz for an own goal with five minutes of regulation time remaining, and then Gerrard rifled home a 20-yard winner deep into injury-time.
Liverpool replaced the injured Sami Hyypia with Martin Skrtel in defence for the match, while Gerrard shrugged off worries over a groin problem to start in a match which saw Robbie Keane and Andrea Dossena make their home league debuts.
Middlesbrough boss Gareth Southgate initially named the side which beat Tottenham last week, with new signing Justin Hoyte on the bench.
But a pre-match injury to goalkeeper Brad Jones meant Ross Turnbull was thrust into action at the last moment.
He was put under immediate pressure by Liverpool. After three minutes Fernando Torres surged towards the penalty area and fed Dirk Kuyt whose fierce drive was turned aside at full stretch by Turnbull.
Then Dossena fired over a swirling cross-shot which Turnbull pushed behind.
Torres saw a flicked header go wide before there was a lengthy delay when Dossena and Jeremie Aliadiere clashed heads, both leaving the field.
Boro's French forward returned with his head heavily bandaged, while Dossena needed a stitch before being allowed back into the fray.
It then took a fine flying save from Jose Reina to touch over an 18-yard shot from Boro's Andrew Taylor.
Tuncay and Afonso Alves gave Liverpool central defenders Carragher and Skrtel plenty to think about before Gerrard almost scored at the other end when his dipping drive flashed just over, following neat build-up play between Torres and Kuyt.
Middlesbrough's England winger Stewart Downing, a possible target for Liverpool, cut inside two defenders from the left before sending a shot just wide of the far post.
The pace barely dropped, and only fine defending by David Wheater twice stopped Torres in the box, the second time after the Spaniard had been put clear by Kuyt.
Torres should then have given Liverpool a half-time lead but his shot was deflected wide by Emanuel Pogatetz.
Boro sent out Turnbull for a half-time warm-up in front of the Kop, the goal the visitors were due to defend in the second period.
But despite having the majority of possession, Liverpool were not making clear chances.
All the effort in the world was there from Keane and Kuyt, but Boro's defence was standing firm.
Liverpool's set-plays were weak and ineffective, and corners in particular were repeatedly wasted.
Boro sent on Mido for Alves on the hour mark, the Teesside club clearly believing they could get something out of the game.
And they almost took the lead after 62 minutes when Mido crossed from the left and Tuncay produced a clever turn and flick before forcing Reina into a sharp save.
Liverpool sent on Ryan Babel, fresh from his Olympic campaign with Holland, in place of Yossi Benayoun after 65 minutes.
Torres immediately went close with a 25-yard strike, but it was Boro who grabbed the lead after 70 minutes.
Xabi Alonso conceded possession and the ball was switched from Aliadiere to Mido, some 30 yards out. His fierce, low drive beat Reina and found the bottom right corner.
Liverpool replaced Dossena with Fabio Aurelio, with Boro sending on Hoyte for Taylor.
Keane was booked for dissent after Liverpool were denied a penalty when Gerrard's fierce drive was deflected wide, seemingly off a Middlesbrough player's arm.
Then Mido found his way into referee Mike Riley's book for time-wasting.
Liverpool sent on Nabil El Zhar for Arbeloa with seven minutes left and they finally managed to pile on the pressure.
They drew level when Carragher made the most of Riley playing an advantage after a shot from Alonso hit Gary O'Neil's arm.
Amid loud appeals for a spot-kick, Carragher unleashed a shot which looked to be going off target but deflected past the unlucky Turnbull off Pogatetz.
Turnbull made a fine save from a Gerrard free-kick in injury-time. But in the fourth minute of added time, Liverpool's talisman smashed home the winner, driving the ball into the right corner of the net from the edge of the penalty area after Wheater's poor defensive header.
Teams:
Liverpool: Reina, Arbeloa (El Zhar 83), Carragher, Skrtel,Dossena (Aurelio 75), Kuyt, Gerrard, Alonso,Benayoun (Babel 65), Keane, Torres.
Middlesbrough: Turnbull, Wheater, Huth, Pogatetz,Taylor (Hoyte 75), Aliadiere, O'Neil, Shawky, Downing,Alves (Mido 60), Sanli (Digard 87).