LIVERPOOL, England — With halftime approaching and the atmosphere inside Anfield getting increasingly tense, a chant drifted across from the away supporters: "Champions League, you're having a laugh."

Liverpool was being held 0-0 by already relegated Middlesbrough on the final day of the Premier League and was in real danger of throwing away a top-four spot that the team had held for most of the season.

Georginio Wijnaldum proved to be the man for the big occasion once again.

The Netherlands midfielder pierced Middlesbrough's packed defence and drove a rising shot into the net in first-half injury time, before Philippe Coutinho and Adam Lallana added further goals in a 3-0 win.

It sealed a fourth-placed finish for Liverpool and a place in the qualifying stages of next season's Champions League.

The prestigious competition is in touching distance for one of the continent's most storied clubs, a five-time European champion.

"It's the best tournament in Europe," Liverpool manager Juergen Klopp said. "There's nothing better maybe in the world. You want to be there. Liverpool needs to be there consistently."

Liverpool will need to win a two-legged playoff in August to play in the Champions League for only the second time in eight seasons, since American-run Fenway Sports Group bought the club in 2010.

It's quite an achievement for a club that almost broke even in the last off-season while all of its rivals were spending heavily. Liverpool, with 76 points, finished higher in the standings than Arsenal and Manchester United, and only two points behind third-placed Manchester City.

"Everything feels good at this club at the moment," Klopp said. "We deserve this position. 76 points is an outstanding number."

Wijnaldum was relegated with Newcastle last season, but has proved to be a brilliant and under-rated signing by Klopp.

The Dutchman grabbed the winner against Manchester City on Dec. 31, scored at home to Chelsea and Arsenal, and was arguably Liverpool's best player in the 2-0 win over Tottenham in February — a result that got the team back on track after a run of poor form early in 2017.

All six of his goals have come at home, none more important than Sunday's.

It was the first occasion where a midfield runner broke from deep beyond Middlesbrough's defence, with Wijnaldum found by a deft flick by Roberto Firmino. The finish from the angle was unforgiving, high inside goalkeeper Brad Guzan's near post.

The relief was obvious inside Anfield, and the second half was like a celebration.

Coutinho kept up his brilliant recent form by curling a free kick into the bottom corner in the 51st, and Lallana finished off a sweeping counter-attack with a low shot into the corner in the 56th.

The result could have been so different had Middlesbrough been awarded a penalty midway through the first half when Liverpool defender Dejan Lovren appeared to haul down Patrick Bamford in the area.

Lovren was the last defender and would have been sent off.

"I thought it was a definite penalty," Middlesbrough manager Steve Agnew said

Liverpool got away with it and now faces a massive start to Klopp's second full season in charge.

"Usually at the end of the season you are tired," Klopp said, "but tomorrow I could start again."

___

Steve Douglas is at www.twitter.com/sdouglas80