Stefano Pioli insisted Milan learnt a "valuable lesson" following their entertaining 3-2 defeat to Liverpool upon the club's return to the Champions League.

Milan were featuring in the Champions League for the first time since 2014 and the seven-time winners threatened an upset at Anfield, where the visitors surprisingly claimed a 2-1 half-time lead.

Ante Rebic and Brahim Diaz both scored within two minutes of each other on the stroke of half-time to stun Liverpool, who had Mohamed Salah's penalty saved by Mike Maignan following Fiyako Tomori's ninth-minute own goal.

But Salah redeemed himself with an equaliser three minutes into the second half before Jordan Henderson's first Champions League goal in seven years settled the Group B thriller on Merseyside.

Despite leaving England empty-handed, Milan head coach Pioli – whose Rossoneri have won their opening three Serie A games this season – was relatively upbeat post-match.

"This was a valuable lesson that will help us going forward. The team was motivated, we expected Liverpool to start strong, but were a bit too static and couldn't get past their first press. When you don't have the ball, you run into danger," Pioli told Sky Sport Italia.

"It was a very good game of football, it's a pity we lost the game, because a strong start here would've been very important.

"I leave Anfield aware this team can grow more and we still need that extra step up in terms of details, because those are what make the difference in the Champions League.

"We lost because on a set play we cleared the ball to the edge of the box and that is not what we ought to be doing."

Rebic became the seventh Croatian to score on his Champions League debut and the first since Miroslav Orsic for Dinamo Zagreb in September 2019.

Meanwhile, team-mate Diaz (22 years and 43 days) is the youngest player to score on his Champions League bow for Milan since Yoann Gourcuff in September 2006 (20 years and 64 days against AEK Athens).

"Liverpool deserve credit for their intensity and quality, above all in the first 25 minutes," Pioli said. "We had been able to turn it around and the real regrets are the two goals we conceded in the second half. Along with Liverpool's quality, we also made mistakes on those two goals.

"Hopefully, in future we'll face teams with slightly less quality and won't concede in those situations."

Milan are winless in their past nine European away games against English opposition (D4 L5), since a 1-0 victory against Manchester United in February 2005.

Pioli – whose Milan visit rivals Juventus on Sunday – added: "What disappoints me and we must work on is that we can do better, because we allowed Liverpool some give-and-go situations that we usually defend better against.

"We could've created a lot more problems for the Liverpool forwards and made it more difficult for them."