An injury-time winner from Ruben Palazuelos earned Hearts a 2-1 win at home to Motherwell and kept them on course for third place in the Clydesdale Bank Premier League.
Stephen Hughes' 75th-minute equaliser looked to have rescued a deserved draw for the visitors to dent Hearts' European hopes, but the Spaniard's strike — which took a deflection to wrong foot Graeme Smith — won it.
Csaba Laszlo's men restored their five-point advantage over Dundee United in the race for third to the delight of the Tynecastle crowd. But Hearts, unbeaten at home in the SPL since losing to Celtic on November 2, were lucky to be level at half-time after Hughes struck the bar.
Andrew Driver nodded home to break the deadlock but McGhee was also left concerned at the health of captain Stephen Craigan after he was stretchered off just before Hughes' goal.
Meanwhile, Steven Fletcher struck a late winner at New Douglas Park to revive Hibernian's hopes of making the Clydesdale Bank Premier League top six. Fletcher ran on to Derek Riordan's clever reverse pass to ease the pressure on manager Mixu Paatelainen. This was Hibernian's third win over Hamilton this season.