Rangers left it late to take advantage of the decision to play this one-off UEFA Cup tie in neutral Warsaw by scoring the game's only goal just five minutes from time.
It had been a hugely fraught evening in the Wojska Polskiego stadium until Bert Konterman struck a fierce drive that took a wicked deflection off Andrey Gordeev to settle the tie.
The Russians will feel increasingly hard done by after this affair was reduced to one game and taken away from their home in Dagestan. The victory puts the Scots in today's draw, but in front of only 3,700 fans it was a hard-fought and very untidy win.
Rangers began sluggishly and this gave the Russians confidence. After just 12 minutes the Glasgow side were in difficulty as a long ball over the top eluded Lorenzo Amoruso and Craig Moore and it was left to Arthur Numan to race inside from the flanks to clear, although he appeared to impede Edu in the process.
That early fright failed to raise the Scots from their stupor and the giant-size Michael Bilong was allowed to abandon his defensive duties to meander forward, but his final shot did not match the run and it sailed over the bar.
It was not what the noisy contingent of Scottish fans had hoped for, and after a skirmish in the crowd one fan was led away with a bloody nose. His team were getting something similar from the Russians.
Indeed, it was fully 25 minutes before they seriously threatened Alexandr Zhidkov, but when called on the goalkeeper produced a fine save to deny Russell Latapy.
Yet such an incisive attack was rare and Rangers' frustration was illustrated by Fernando Ricksen's clumsy foul on Narvik Sirkhaev that earned the Dutchman a booking.
To make matters worse, almost immediately Bilong produced a not dissimilar challenge on Neil McCann on the edge of the Anzhi area but this time German referee Edgar Steinborn ignored the tackle and dismissed Rangers' penalty claims. This brought Dick Advocaat out of his dug-out to complain bitterly. The Rangers manager, celebrating his 54th birthday, was not enjoying the occasion.
His team, perhaps fearful of the sight of their irate boss, then put together a few reasonable moves. In one, Zhidkov brilliantly punched away a fierce McCann drive and then Murad Ramazanov saved Sergey Yaskovich from an embarrassing own-goal when the defender mis-headed a McCann corner.
After the interval the Russians continued to test Rangers and Stefan Klos was called on to make a good save from Sirkhaev just two minutes after the restart.
The play, though, was patchy and inconclusive for long spells. When there was danger of any description it was usually around Klos.
The Rangers fans almost had cause to celebrate after 71 minutes when Amoruso's drive troubled Zhidkov, but 14 minutes later Konterman provided the genuine article.
ANZHI MAKHACHKALA: Schidkov, Yaskovich, Grodeev, Agalarov, Sirkhaev, Adiev, Ramazanov, Akaev (Nikolich 87), Bilong, Edu, Tsymbalar. Subs not used: Holly, Ngangue, Ivanov, Hoshic, Alexeev, Armishev. Booked: Tsymbalar.
RANGERS: Klos, Ricksen, Moore, Amoruso, Numan, Konterman, Ferguson, Latapy (Hughes 90), McCann (Lovenkrands 63), de Boer, Flo (Caniggia 58). Subs not used: Dodds, Kanchelskis, Christiansen, Vidmar. Booked: Ricksen. Goal: Konterman 85.
Referee: E Steinborn (Germany).