Match ends, Liverpool 2, Sunderland 1.
Liverpool continued their Premier League title charge, overcoming Sunderland after suffering a scare.
With the Reds thwarted early on, Santiago Vergini was fortunate to stay on the pitch after fouling Luis Suarez.
But Steven Gerrard drew the full reward from the free-kick, finding the top corner from 23 yards.
Daniel Sturridge curled in his 20th league goal but, after Ki Sung-Yueng's header, the hosts held on to move above Manchester City into second place.
The Merseyside team, who are chasing their first top-flight title since 1990, earned their seventh consecutive win and are now just a point behind leaders Chelsea, who they welcome to Anfield on 27 April.
They also host Tottenham and City before then and, though those teams may ask more questions than Gus Poyet's struggling side, it was still a well-earned victory against a team which had more of an attacking threat after going two goals behind.
The Black Cats are mired in the relegation zone, three points from safety, so were expected to be cautious. But once they introduced substitutes Ki and Adam Johnson, they caused some nervy moments among the Anfield crowd with John O'Shea missing the target with a header from six yards out late on.
Poyet's decision to play three centre-backs largely paid off in the first half as Sturridge and Luis Suarez were denied the time and space that has allowed them to be so prolific this season.
Both strikers hit efforts over the bar but, crucially, Sunderland's defence in numbers stopped them breaking on the counter-attack.
The Liverpool supporters, who had escorted the team bus on its way into Anfield, were subdued but sparked to life when Philippe Coutinho dispossessed Lee Cattermole in midfield. He played in Suarez, who was brought down by Vergini 25 yards from goal.
With the Uruguayan striker seemingly clean through, the incident looked like it merited a red card for the Sunderland defender but referee Kevin Friend opted for yellow.
If Liverpool fans were feeling short-changed, they need not have worried. Liverpool skipper Gerrard fired in, wrong-footing Vito Mannone with the free-kick.
Four minutes later, Liverpool goalkeeper Simon Mignolet was drawn into his first action, pawing away a shot by Connor Wickham, who was recalled from his loan spell with Leeds to start up front.
It was a wake-up call for the Liverpool defence but the hosts went further ahead in the second half when ex-Red Andrea Dossena stood off Sturridge and the striker found the top corner via a deflection off Wes Brown.
That gave Liverpool breathing space and, after Suarez tested Mannone with a backheel, the home supporters started to sing "We're going to win the league".
But Poyet brought on Johnson and Ki and, after Cattermole crashed a shot against the bar, with Sturridge doing the same, Ki grabbed a goal back with 14 minutes remaining as the ball came through to him from a corner.
There followed a nervous period for the hosts, with collective relief at the final whistle after O'Shea wasted a golden chance to draw level from Johnson's late free-kick.
Sunderland boss Gus Poyet: "For some reason everyone was writing us off, everyone was expecting a party where Liverpool win four-five or six nil. Maybe we will not that good in the beginning but we didn't allow them to play. The substitutes gave us that quality on the ball we were missing and in the end it looks like they were asking for the time and the fact the Liverpool fans celebrated shows that it was a tough game [for them].
"I would like to start the [next game against West Ham] now with same names that finished with that tempo and belief. If we don't believe in ourselves in the way we finished today then we make a massive mistake."
For the best photos from Wednesday's Premier League games visit the BBC Sport Facebook page.
- 15SturridgeSubstituted forSterlingat 77'minutes
- 9Iago Aspas
- 2BardsleyBooked at 40mins
- 3DossenaSubstituted forColbackat 83'minutes
- 27VerginiBooked at 37mins
- 23GiaccheriniSubstituted forJohnsonat 61'minutes
- 10WickhamSubstituted forKi Sung-yuengat 61'minutes
- 4Ki Sung-yueng
- Kevin Friend
- Shots on Target
Second Half ends, Liverpool 2, Sunderland 1.
Foul by Raheem Sterling (Liverpool).
Jack Colback (Sunderland) wins a free kick in the defensive half.
Raheem Sterling (Liverpool) wins a free kick on the right wing.
Foul by Lee Cattermole (Sunderland).
Attempt blocked. Philippe Coutinho (Liverpool) right footed shot from the left side of the box is blocked. Assisted by Luis Suarez.
Attempt missed. John O'Shea (Sunderland) header from very close range misses to the right. Assisted by Adam Johnson with a cross following a set piece situation.
Foul by Glen Johnson (Liverpool).
Jack Colback (Sunderland) wins a free kick on the left wing.
Joe Allen (Liverpool) wins a free kick in the defensive half.
Foul by Santiago Vergini (Sunderland).
Substitution, Sunderland. Jack Colback replaces Andrea Dossena.
Martin Skrtel (Liverpool) wins a free kick in the defensive half.
Foul by Jozy Altidore (Sunderland).
Attempt missed. Luis Suarez (Liverpool) right footed shot from outside the box is just a bit too high from a direct free kick.
Luis Suarez (Liverpool) wins a free kick in the attacking half.
Foul by Lee Cattermole (Sunderland).
Attempt saved. Luis Suarez (Liverpool) right footed shot from outside the box is saved in the top centre of the goal. Assisted by Philippe Coutinho.
Substitution, Liverpool. Raheem Sterling replaces Daniel Sturridge.