Two goals in five minutes midway through the first half gave Ukraine its first win of Euro 2020, edging North Macedonia 2-1 and getting their first win at the Euro since 2012.
Andriy Yarmolenko scored in the 29th before Roman Yaremchuk added a second in the 34th minute. Ezgjan Alioski scored for North Macedonia in the second half.
Both teams missed second-half penalties.
For the opener, West Ham's Yarmolenko met Oleksandr Karavaev's flick on from a corner to tap in midway through the first half. It was Yarmolenko's 42nd goal for his country, six back of the all-time record held by current Ukraine manager Andriy Shevchenko.
Five minutes later, Yaremchuk beat the offside trap to meet Yarmolenko's ball and slide past Stole Dimitrievski at the near post to make it 2-0.
After a scramble in front of the Ukraine goal in the 56th, North Macedonia was awarded a penalty. Alioski's attempt was smartly denied by Georgi Buschcan, but the Leeds United man was first to the rebound to poke home and give North Macedonia life at 2-1.
In the 82nd, VAR adjudged that Daniel Avramovski handled in the box, giving Ukraine a penalty, but Dimitrievski was up to the task, turning aside Ruslan Malinovskiy's effort. Of the five penalties awarded at Euro 2020, thus far, only Cristiano Ronaldo has scored.
The scoreline could have been much higher had it not been for Herculean efforts from both Dimitrievski and Bushcan.
Ukraine will finish up their campaign against Austria, while North Macedonia meets Netherlands in their final matchday.
Should the Dutch fail to lose against Austria later on Wednesday, North Macedonia will be eliminated from Euro 2020.