MILAN (AP) — Edin Džeko scored twice to help Inter Milan reach the Champions League knockout stage for the first time in 10 years after it beat Shakhtar Donetsk 2-0 on Wednesday.

Džeko’s two goals came in the space of six minutes in the second half. Inter had been by far the superior team but had been let down by poor finishing, while Shakhtar goalkeeper Anatoliy Trubin had also pulled off a number of good saves.

Inter had earlier had two goals disallowed and Nerazzurri coach Simone Inzaghi enthusiastically celebrated Džeko’s opener.

“It was an important night,” said Inzaghi, who took over from Antonio Conte in the offseason. “It’s the first thing I said in my first press conference. It’s been 10 years since Inter was in the last 16 and the fans, the club deserve it.

“It was an aim I had from the beginning and the players think the same as me," he added. "After the first half went the way it did, with a superb goalkeeper, I had an exuberant celebration.”

The Italian side is second in Group D, two points behind Real Madrid, which beat Sheriff 3-0 later Wednesday. With the loss, Sheriff stayed with six points and is unable to advance. The Nerazzurri travel to Madrid for their final match.

Shakhtar will finish bottom of the group.

Both sides needed a win at San Siro for different reasons, but the last three Champions League matches between the two had ended goalless.

Inter started strongly but was again guilty of wasting chances. Nicolò Barella had the best opportunity of the early stages but he fired over from 10 yards as he slipped while attempting to reach the ball at full stretch.

Inter was almost made to pay for its profligacy as Samir Handanović had to make the first save of the match in the 16th minute with the Nerazzurri goalkeeper parrying Dodô’s snapshot.

The home team had a dangerous spell with five chances in four minutes. First, Barella surged forward from midfield and cut inside with a dummy before rolling across for Lautaro Martínez but Maycon denied him with a perfectly timed tackle.

Inter defender Andrea Ranocchia headed the ensuing corner just past the right post and moments later Ivan Perišić had a goal ruled out for offside in the buildup.

Trubin then made two saves in quick succession to deny Džeko as the 20-year-old continues to prove himself as one of the most promising young goalkeepers in Europe.

Inter had another goal disallowed in the 57th minute as Martínez’s volleyed effort was ruled out for a push on Shakhtar defender Mykola Matviyenko by the Inter forward.

But the Nerazzurri did take the lead moments later. Perišić flew down the left flank and his cross was deflected to Matteo Darmian, whose attempt was blocked but the onrushing Džeko thumped in the rebound from the edge of the area.

Džeko doubled his and Inter’s tally in the 67th when he headed in a cross at the far post from point-blank range.

Shakhtar almost got one back in the dying minutes but Dodô’s shot came off the base off the right post and rolled along the goal line before going out for a corner.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports