Nacho Novo scored twice as Rangers overcame battling Hearts at Ibrox to go top of the SPL table.
Paul Hartley shot the visitors into an early lead from the penalty spot after Mark de Vries had been tripped.
But Rangers equalised on the stroke of half time when Jamie McAllister knocked the ball into his own net.
Novo chipped his first goal over the advancing Craig Gordon before de Vries headed Hearts level, but Novo managed to head in the winner after 81 minutes.
Rangers had a chance inside two minutes when Peter Lovenkrands, set free on the left by Fernando Ricksen, squared the ball across the box to Dado Prso, but the striker fired wide.
Novo forced Hearts goalkeeper Craig Gordon into a smart save soon afterwards with a low drive from an angle from the right.
Hearts were playing some neat football and in the 15th minute they were awarded a penalty when Jean-Alain Boumsong brought de Vries down after Andy Webster had headed a Stefan Klos clearance upfield.
Hartley made no mistake from the spot to put Hearts ahead before Gordon made another save in the 22nd minute to deny Prso.
Novo fired wildly off-target from a good position after Steven Pressley had beaten Prso in the air, challenging for a dangerous Lovenkrands delivery.
Hearts skipper Pressley then threw himself in the way of a header from Lovenkrands which would have hit the target.
A run from Novo caused great problems for Hearts and his ball across the box from the byline reached Prso at the back post but, once again, the striker could not hit the target, heading wastefully wide.
But, in the last minute of the first half, McAllister put through his own goal in a desperate attempt to stop Ricksen getting on the end of a Lovenkrands ball to the back post.
Rangers started the second half strongly and Hearts, who had to replace Pressley with Christophe Berra at the interval, were pinned back around their own penalty area.
Hartley scored the opening goal for Hearts
And the pressure paid off when Novo ran on to ball played over McAllister by Zura Khizanishvili and was able to dink the ball over the advancing Gordon.
Lovenkrands then fired wide after a terrific turn on the edge of the box as the home side continued to pour forward.
But Hearts hauled themselves back into the game after 66 minutes when de Vries stole across Marvin Andrews and stooped to head Joe Hamill's flighted cross from a deep area beyond Klos.
De Vries then headed over the top after stealing away from Boumsong to meet an excellent cross from McAllister.
Gordon made a good save from an Andrews header before Novo popped up to grab the winning goal nine minutes from time.
Rangers substitute Stephen Hughes delivered a good cross from the left and Novo was able to squeeze a header in for his 14th goal of the season.
With Celtic slipping up at Dens Park, Rangers now move one point clear at the top of the league.
Rangers: Klos, Khizanishvili, Boumsong, Andrews, Ross, Namouchi (Hughes 75), Alex Rae, Ricksen, Lovenkrands, Prso, Novo. Subs Not Used: Graeme Smith, Malcolm, Mladenovic, Hutton, Steven Smith, Fetai.
Booked: Boumsong. Goals: McAllister 45 og, Novo 56, 81.
Hearts: Gordon, Neilson, Pressley (Berra 45), Webster, McAllister, Wyness (Weir 59), Hartley, Kisnorbo, Hamill, de Vries, Pereira (Stewart 71). Subs Not Used: Moilanen, MacFarlane, Janczyk, Sloan.
Booked: Hartley, Wyness, Kisnorbo. Goals: Hartley 16 pen, de Vries 66.
Ref: D McDonald