However, Ritchie's 65th-minute victor came against the run of play and the Magpies had to defend for their lives as time ran down.
Jurgen Klopp's side, who featured former defender Virgil van Dijk on his first return to the club he left in January, took a sixth minute lead when Brazil forward Firmino netted for the 20th time this season.
Jurgen Klopp's side sit fourth as they head to St Mary's, with Tottenham's 1-0 north London derby win over Arsenal sending Mauricio Pochettino's men third in the table - and fifth-placed Chelsea are just a point behind Liverpool.
"They gave their lives to keep a clean sheet", he added.
"My verdict is that we could've been here for 10 hours and not scored a goal". When you see the amount of chances we lost, starting in the first half when Anthony [Martial] was facing the keeper.
Modi Begins 3-Nation Tour; Says Palestine Visit a 'Historic' Occasion
On his visit to Israel in July, the premier gave Netanyahu his signature bear hug, and the two strolled barefoot along a beach. He is the first prime minister to visit Palestine. "I got an invitation from the President to meet the Indian Prime Minister".
You know how it felt to be sitting/standing watching on as a fan, never mind being Rafa Benitez who we are all counting on to perform minor miracles this season. Were Newcastle lucky? Yes, they were.
The Magpies almost went ahead in the five minute but David de Gea was on hand to deny Jonjo Shelvy from close range. I think they are a good team and I think they have a very good transfer window with Kenedy and [Islam] Slimani, two players I know well who can improve their team.
Rafa described today as "an fantastic effort" and who would/could argue?
Agreeing that he is not ideal, Mourinho said, "I'm not going from the Bad One to the flawless One, no way, but I try, I make an effort and I'm happy with the way things are going". I think the stadium is really nice, I like the atmosphere.
"I know Shaw since he arrived in the Premier League with Southampton and know his potential and quality", he said.
"We are second, so our position is better than all the others that are behind us, but there is still a lot of matches still to play and we have to fight for the position".
- House panel gives Bannon another week to comply with subpoena
- Duterte orders military to cancel helicopter deal with Canada
- Sanchez punished for tax evasion in Spain
- Jones accuses Wales captain of insulting referees
- Qualcomm will meet with Broadcom to discuss $121 billion buyout
- The Future of Windows Could Be Passwordless
- U.S. spies, seeking to retrieve cyberweapons, paid Russian peddling dirt on Trump
- Florida boy climbs into claw machine to retrieve toy and gets stuck
- TheDC Newsroom: Winter Olympics Are Heating Up
- 'Solo: A Star Wars Story' Teaser Takes Flight With Millennium Falcon