In the proverbial game of two halves Aberdeen raced to a emphatic 2-0 half-time lead, only to be pegged back for long periods of the second half.
However Rangers must feel very frustrated due to the number of clear cut chances they squandered.
Had the visitors shown the same fight and determination during the first period then the outcome may have been entirely different.
As it was Aberdeen rode their luck at times, but over the distance just about deserved all three points.
Dons boss Jimmy Calderwood gave a home debut to on loan Ferne Snoyl, who joined the club from Feyenoord during the recent transfer window.
Alex McLeish retained faith with the majority of the side which went down to a surprise 3-0 reverse in the Cup against Hibs at the weekend.
The only change seeing the return of the fit-again Dado Prso in place of Thomas Buffel.
Aberdeen passed up a great opportunity after 12 minutes when a deep cross from the right played in by Chris Clark, allowing Jamie Smith to drift between Rangers centre-backs Marvin Andrews and Sotirios Kyrgiakos, but from eight yards his header failed to hit the target.
Abderdeen had a let-off minutes later when Peter Lovenkrands picked out Kris Boyd with his cross at the far post.
The big striker knocked the ball towards strike partner Prso, only for Russell Anderson to make a last-ditch challenge to save the day.
Boyd then passed up the best chance of the match thus far. A long-range Robert Malcolm effort ricocheted into his path, but from 14 yards his shot was too close to Dons keeper Jamie Langfield.
Aberdeen's defence nearly paid the penalty for giving away a cheap corner 32 minutes in, when Andrews rose unchallenged to head Chris Burke's cross narrowly over.
The Dons' desire to get forward at every opportunity finally paid off on 33 minutes when a forceful run by debutant Snoyl saw him lope past Malcom before his low cross into the area was met first time by Smith, who slammed the ball home from 12 yards.
Pittodrie erupted again just before the half-time whistle when a long free-kick from Scott Severin saw Anderson rise above Ian Murray to power a header across the area for the unmarked Steve Lovell to easily net for the home side.
Brilliant play wide on the left by Burke immediately after the restart presented Barry Ferguson with an excellent chance to get his side back into the game, however the visitors' skipper snatched his shot from ten yards wide of the upright.
Aberdeen were allowing Rangers plenty of possession in midfield and were fortunate again in 50 minutes. Malcolm picked out Fernando Ricksen's run inside the area, but the full-back's effort was well off target.
It was all Rangers at this stage, Lovenkrands being the next visiting player to miss when in a good position, firing well wide from ten yards.
It was clearly not going to be Rangers' night when after 78 minutes Prso sent Burke racing clear, yet again a poor first touch let the youngster down which meant he could only hit the sidenetting.
From then until the final whistle Aberdeen defended stoutly with skipper Anderson being outstanding.