The visitors couldn't find a way back into the match and slumped to a sixth straight league defeat.

The Tynecastle club, who had been issued a winding-up order over a £450,000 tax bill a few weeks ago, had a issued a rallying call to supporters to turn up in numbers at home matches.

And the call had clearly been answered by the fans, with a crowd of 16443 inside the stadium.

The home players were obviously inspired and, after some early pressure, Callum Paterson got a glancing header on a Grainger free-kick, but his effort was deflected wide.

Media playback is not supported on this device

Interview - Hearts boss John McGlynn

The home side continued to dominate possession as the first half wore on, but, with only one player up front, were struggling to create chances, although Darren Barr flashed a right-footed effort wide from the edge of the box.

A flowing passing move starting at right-back led to Ryan Stevenson being teed up just inside the St Mirren D, but he dragged his shot wide of the mark.

At the other end Steven Thompson was set up by a low ball from fellow former Scotland international Gary Teale, but his shot was blazed well over.

The second half began in even more cagey a fashion that the first.

Hearts contined to dominate possession, with St Mirren happy to sit deep, but a lack of cutting edge continued to frustrate them in any attacking sense.

And then, out of nothing, the home side found themselves ahead courtesy of a freak goal after Jim Goodwin, just returned from suspension, felled Andy Webster 25 yards from goal.

Media playback is not supported on this device

Interview - St Mirren boss Danny Lennon

Grainger took the free-kick, which spun off the boot of the onrushing McLean and looped beyond the helpless Samson into the net.

St Mirren gave some response to going a goal down after changing to a 4-4-2 formation, with a Marc McAusland header forcing Jason Holt into clearing off the line at the back post.

Kenny McLean also went close with a left-footed low drive from the edge of the box after Thompson robbed Andy Webster some 30 yards from the Hearts goal.

Andy Driver should have killed the game, when a Hearts counter-attack left him one-on-one with Samson, but he could only drag a right-footed shot wide.

The result, coupled with Dundee's victory over Hibernian, leaves St Mirren only a point off bottom spot.

Hearts move up to seventh in the table, but the Tynecastle board may be more happy with the packed stadium.