Metalist Kharkiv secured their place in the last 32 of the Europa League as Denis Oliynyk's goal three minutes from time completed a 2-1 win over Debrecen .
Peter Czvitkovics gave Debrecen a surprise lead early in the second half but Adam Bodi's own goal evened the scores and Oliynyk's strike earned Metalist maximum points.
They go into their final Group I match away to leaders PSV Eindhoven three points behind the Dutch side but are now five ahead of third-placed Sampdoria.
For Debrecen the misery continued as this defeat made it five losses from five in the group.
The home side were the first to threaten after 10 minutes when Marko Devic's right-foot shot from the edge of the area was hell held by Debrecen goalkeeper Mindaugas Malinauskas.
The Hungarians responded in kind with an effort from Bodi which Metalist number one Maxim Startsev got behind.
Startsev was on alert again in the 18th minute to block a volley from Czvitkovics after Peter Kabat's cross picked him out.
Devic tested out Malinauskas again midway through the half as he reacted first to Oliynyk's inswinging corner from the left but the remainder of the half petered out as the game drifted to its midway point goalless.
The visitors gained the upper hand four minutes into the second period when Zoltan Kiss' cross from the left found Czvitkovics and he drilled home a right-foot shot from six yards.
The lead was short-lived, however, as Metalist levelled through a Bodi own goal after 55 minutes.
Volodymyr Lysenko tried his luck with a 25-yard volley as the game entered the last five minutes of normal time, but his ambitious effort cleared the crossbar as Debrecen remained on course for their first group stage points.
However, the home side grabbed a vital winner in the 87th minute as Andriy Vorobey's cross from the left was turned in by Oliynyk from close range.