Papac’s winner provided a ‘Get Out Of Jail’ card for Walter Smith’s men who under performed for long spells but somehow came out on top.
The gaffer was forced to reshuffle his side for today’s clash with Madjid Bougherra and Pedro Mendes both missing.
Bougherra had problems returning to this country after playing for Algeria in the World Cup last weekend and did not travel to Perth with the squad.
Mendes, meanwhile, suffered a thigh strain while on international duty with Portugal and was not risked given that Rangers are in Champions League action on Tuesday night against Unirea Urziceni.
The absence of Bougherra meant that McCulloch joined Weir in the heart of defence with Kevin Thomson in the centre of midfield alongside Steven Davis.
Kyle Lafferty also joined Boyd in attack for what was the Northern Ireland star’s first start of the season.
The Saints, as expected, came out of the traps quickly and showed their intent after only two minutes.
Samuel skipped past McCulloch on the left and his back post cross found Martin Hardy who saw his header back across goal hit the post.
The early stages must have been a huge concern for Smith who watched on from the stands as the home side dominated the majority of the first-half and his players were wasteful in possession.
And on 17 minutes Derek McInnes’ men got their reward when they opened the scoring through Samuel.
The powerful striker latched on a through pass before putting his shot beyond McGregor at his near post.
After the goal the Light Blues immediately tried to get back in to the game but they struggled to get out of first gear.
Steven Whittaker, one of Gers’ best player on the day, produced a mazy run in to the last third before he was hauled to the ground 20 yards from Alan Main’s goal.
Rothen took the resulting free-kick and his dipping effort beat the wall but was inches over the bar.
In the opening half-hour Rangers were poor and a slack pass by Kevin Thomson on 37 minutes saw Ally McCoist fly in to a rage in his technical area.
This, however, seemed to have the desired effect and, against the run of play, the scoreline was level on 39 minutes.
Sasa Papac passed inside to Thommo and his shot from 30 yards was blocked by a defender eight yards from goal.
The ball fell perfectly for Boyd who slotted home his fourth goal of the season with aplomb.
When the referee blew for half-time the speed in which McCoist and McDowall darted down the tunnel suggested that the Gers’ players were in for a rollicking.
Smith, however, made no changes to his team for the start of the second period and his players responded by showing far more urgency going forward.
This, however, also made the game more open and the Saints had to be watched carefully on the break.
Eight minutes in and Martin Hardy provided a stunning cross from the right and if Murray Davidson had got any connection with the ball from six yards he would have scored.
The dangerous Samuel then tested McGregor with a powerful near post shot which the keeper did well to hold.
On the hour mark Rangers made their first change with Steven Naismith replacing Steven Smith on the left wing.
But on 67 minutes it was Kyle Lafferty that did brilliantly to weave his way past two defenders but his decision to squirm a shot across goal as oppose to square it to Boyd proved a poor one.
With 15 minutes to go Novo was thrown on in place of Rothen as Rangers looked to avoid yet another away draw at this early stage of the season.
And it was not long before Smith threw his last roll of the dice with Kenny Miller asked to make a late impact.
It was not Miller, however, that secured the points for Rangers; it came from Papac who blasted home a majectic strike on 83 minutes.
The Bosnian found space 20 yards from goal and he only glanced up once before curling a delightful effort passed the helpless Main.
The Saints continued to push forward in search of a late leveller with Murray Davidson again pulling a save out of the excellent McGregor.
This was not a pretty performance by Rangers but they managed to grind out a win that takes them two points clear until Celtic play later in the day.
The result, as they say, is all that matters.