Ricardo Quaresma's injury-time winner gave Besiktas a dramatic 3-2 win over Maccabi Tel Aviv in Europa League Group D and with it a fine chance of reaching the knockout stages.
Besiktas squandered a two-goal lead and seemed to be heading for a point until Quaresma struck with a goal which meant the Turks are guaranteed to progress if they beat group winners Stoke in Istanbul next month.
With the pressure mounting on both teams the early stages of the game were marred by a number of bad fouls and goalmouth incidents were almost non-existent until the visitors grabbed the lead in first-half injury time.
Quaresma fired home with a right-foot shot from the left side of the penalty area after Egeman Korkmaz had crossed from deep on the left, giving the Turks the lead in a half that appeared destined to finish goalless.
Besiktas doubled their lead within two minutes of the restart when Manuel Fernandes swung in a corner from the left and Ibrahim Toraman rose highest to nod past Maccabi goalkeeper Barak Levi from six yards.
The home side came close to reducing the deficit on the hour when Guillermo Israelevich's right-foot shot from 12 yards was superbly tipped round the post by Besiktas goalkeeper Cenk Gonen.
Less than a minute later Tel Aviv were back in the match when Savo Pavicevic's corner was knocked on by Israelevich to Shiran Yeyni who pounced to drill home low from six yards.
And the visitors were stunned in the 72nd minute when Tel Aviv wiped out their two-goal deficit when Moshe Lugasi fired into the top corner of the net from 20 yards.
The home side were looking most likely to grab the points and forced a succession of corners before Besiktas responded with Hugo Almeida heading a Quaresma cross just over the bar.
Just when time seemed to have run out for the Turkish side, Quaresma kept his nerve to slide home the winner from 18 yards to give them the best possible chance of joining Stoke in the next stage.