SWANSEA, Wales — A week after inflicting Manchester City's first loss in the English Premier League, Liverpool lost at last-place Swansea 1-0 on Monday and ended its 18-match unbeaten run in all competitions.

Alfie Mawson's 40th-minute strike secured one of the most surprising results of the season on a night Liverpool's usually lethal attack toiled at Liberty Stadium.

"If you put a Formula One (car) in London at 4 o'clock in the traffic, the Formula One (car) will not run very fast like it should," Swansea manager Carlos Carvalhal said. "It was exactly what we should do to play Liverpool — put them to play the way they don't like."

It was a far cry from Liverpool's devastating display in its 4-3 win over runaway leader City eight days earlier when Juergen Klopp's team didn't seem to miss the departed Philippe Coutinho, who joined Barcelona for 160 million euros ($192 million) this month.

Liverpool could have done with Coutinho's creativity against a Swansea side that defended stoutly, stifling Mohamed Salah for the most part, and took its only real chance.

From a Swansea corner from the right, Liverpool defender Virgil van Dijk could head the ball only back into the danger area where it hit the shins of Federico Fernandez. His central defensive partner, Mawson, shot on the turn from eight meters and it flew into the corner past goalkeeper Loris Karius.

Liverpool nearly grabbed an equalizer in the fourth and final minute of stoppage time, when Roberto Firmino headed against the post and substitute Adam Lallana's shot on the rebound was deflected over by the lunging Mawson.

"Last weekend feels like it was half a year ago," Klopp said. "It's not what I'm interested in. I'm frustrated and angry."

Swansea stayed in last place but was tied on 20 points with West Bromwich Albion, three off safety.

Fourth-place Liverpool was only two points ahead of Tottenham in the race to secure one of four qualification spots for next season's Champions League.

Liverpool hadn't lost in the league since Oct. 22, a 4-1 defeat at Tottenham.