Heart Of Midlothian 1 Glasgow Celtic 2
But they were put under pressure by an inspired Hearts side less than a week after the departure of manager John Robertson.
The visitors came under pressure early, conceding a flurry of corners in the opening two minutes as goalkeeper Rab Douglas struggled to clear his area.
He spilled the ball from the first corner and was only saved by Jackie McNamara who cleared the ball off the line before Hearts could take advantage of the mistake. The second corner was blocked on the line by Chris Sutton
Hearts continued to hold the initiative in the early minutes and could have taken the lead through Graham Weir after 12 minutes when Douglas failed to clear following his long-range shot and was again bailed out by McNamara.
As Celtic's frustration grew they continued to give away free-kicks, handing possession to Hearts as Sutton and Bobo Balde both picking up yellow cards.
Then, against the run of play Alan Thompson netted a vital goal for the Hoops on 25 minutes. His drive at the far post deflected off Robbie Neilson, goalkeeper Craig Gordon was wrong footed and Celtic had some breathing space after a nervous start.
Hearts continued to press and Weir had another scoring chance six minutes from the break with a free header six yards from goal. But he directed the ball straight at Douglas who didn't make any mistake this time.
After the interval the Jambos were unable to sustain the tempo they had set in the first half and Celtic took control of the play, but they could not find a way through to score the second goal which would have given them a cushion.
And on 71 minutes they were forced to pay as Paul Hartley equalised for Hearts, blasting an unstoppable shot past Douglas from a Neilson cross.
But Celtic stepped up the pace again and less than two minutes later Craig Bellamy forced a diving save from Gordon before Sutton blasted a shot off the woodwork.
On 77 minutes substitute Beattie put Celtic back in front.
The afternoon ended on a sour note for Hearts as captain Steven Pressley was shown a second yellow card for diving and was given his marching orders.
But Celtic go into the final match of the season knowing that their fate is in their own hands with a two-point cushion over Rangers at the top of the SPL.