CSKA Moscow sneaked into the UEFA Champions League knockout stages as Vasili Berezutsky scored three minutes from time to give the Russians a 2-1 victory at Inter Milan.
With Trabzonspor holding Lille to a goalless draw in France, CSKA leap-frogged the pair to remain in Europe's premier club competition. Seydou Doumbia had given the visitors the lead before Esteban Cambiasso equalised but Berezutsky had the last word.
The hosts had already won the group but this defeat, coupled with a 1-0 home loss to Udinese at the weekend, will have increased the pressure on coach Claudio Ranieri with his side down in 16th in Serie A.
"I have to point out that we achieved our qualification with a game to spare so I'm very happy," Ranieri said. "Tonight we created five or six chances but they had some good chances too.
"At the moment it's going like this but I can't reproach the team for their desire and application. We have to be patient in this time but we fought to the end, it's just results aren't going well, the ball didn't want to go in for [Diego] Milito.
"When you win and you have self confidence things seem easier but now we're having mental dififculties because we're fighting but we're still going home with a defeat and that doesn't help."
CSKA were playing a high backline and a dangerous offside game in the early stages and they were almost made to pay. Captain Javier Zanetti played in Diego Milito behind the defence and although he had two options to pick out, he failed to draw Vladimir Gabulov and left his pass to Coutinho a bit too short, allowing the goalkeeper to pounce and cut it out.
Moments later Milito was again wheeling off the last man and this time he picked out Yuto Nagatomo, but the Japan full-back's finish was weak and Gabulov saved easily.
CSKA's first really good chance came just before the half hour mark as Vagner Love turned outside the box and fired goalwards, but Luca Castellazzi made a flying save. The Brazilian striker than missed a glaring chance as he got to Alan Dzagoev's teasing free-kick first but headed over from six yards.
Nagatomo was proving dangerous when coming forward and Gabulov leapt to his right to tip the diminutive right-back's shot from distance around the post, although television replays suggested it was heading wide anyway.
Milito continued to make a nuisance of himself and had a pair of chances in quick succession, Gabulov blocking his first and the Argentine firing the second inches over the bar.
The second period started with a bang as both sides scored within six minutes of the restart. Love set up Ivorian strike-partner Doumbia to finish clinically past Castellazzi. But just a minute later Andrea Ranocchias headed a corner powerfully goalwards and although Gabulov made a one-handed save, Cambiasso mopped up the rebound from close in.
Castellazzi then saved at his near post from Dzagoev while a Milito header bounced into Gabulov's arms. A lovely CSKA free-kick routine then saw Alexei Berezutsky volley goalwards, but Castellazzi made a comfortable save.
Five minutes from time Milito should have snatched the winner after Zanetti's fine run and cross but he somehow hit the bar with a header from inside the six-yard box. And they were made to pay moments later as Berezutsky headed home a corner to give the visitors the victory.