Former Burnley striker Steven Thompson had put the Buddies in front in the 74th minute when he got in front of his man to turn in Jack Smith's cross.

But Stanley were only behind for three minutes after Miller cut inside and unleashed a strike from the edge of the box that curled past St Mirren goalkeeper Grant Adam, brother of Liverpool midfielder Charlie.