Hearts leapfrogged St Mirren to move into the Scottish Premiership top six for the first time since August as they came from behind to beat the Paisley side at Tynecastle.
St Mirren had gone ahead through the only real chance of the first half, when Mikael Mandron capitalised on a loose ball in the box to fire home.
Hearts hit back in the second half when 17-year-old James Wilson was presented with a simple chance, thanks to Richard Taylor's miss-kicked clearance, and tucked away with aplomb.
Within 10 minutes, the hosts were ahead as Calem Nieuwenhof - making his first start in almost a year - shifted the ball onto his right and curled into the bottom corner from the edge of the box.
It almost went from bad to worse for Stephen Robinson as Killian Phillips was shown a red card as he flew into an aerial challenge and sent Jamie McCart flying.
However, after a VAR review, the red was downgraded to a yellow.
McCart had already been in the wars, having been caught in the face by Mandron's elbow. Referee Euan Anderson only deemed that one worthy of a yellow.
Hearts confirmed the win when Jorge Grant played a one-two with Lawrence Shankland to get into the box.
He squared unselfishly to Kenneth Vargas, who fired home from close range and the goal was given after a lengthy VAR check.
Hearts now have eight wins in their last 10 in all competitions - only losing once in that time - and move to sixth, sending St Mirren down to seventh.