A freak own goal a minute from time gave Morecambe revenge for a Boxing Day defeat by John Coleman's FA Cup heroes.
With time quickly running out Morecambe winger Dean Howell swung in a left-footed cross which was met by the diving Steve Halford, who diverted the ball past the despairing dive of his own goalkeeper Jamie Speare.
It was rough justice for the visitors who created the better chances on the day and could have opened the scoring themselves just moments earlier when Paul Mullin headed wide from just six yards out.
It was Morecambe keeper Craig Mawson who was by far the busiest of the two stoppers, producing a string of fine saves to prevent Accrington collecting a second successive victory over the Shrimps.
He was quickly into action with a fine save after just three minutes from a Ged Brannan header.
The visitors continued to press with Andy Proctor firing wide and shooting straight at Mawson from 20 yards out.
Mawson was in action again with a fine save when his own defender Jamie Murphy sliced a right-wing cross towards goal.
Five minutes later Accrington were through again when Brannan's left-wing cross was well blocked by Mawson again.
It took Morecambe 34 minutes to threaten the Accrington goal, when Garry Thompson fired over from 25 yards, before Speare was called into action for the first time with a fantastic save from Terry McFlynn's volley.
McFlynn was presented with another chance at the start of the second half, but he volleyed over when he could have done better.
Then Accrington began to assert their authority again with Rory Prendergast threatening down the left. On 58 minutes he ran through but produced a woeful cross when Accrington had men spare in the box.
Stanley thought they had taken the lead on 63 minutes when a Mawson save saw the ball rebound to Lutel James and he looked sure to score, but his effort hit the post and run across the goal-line.
Mawson produced another sharp reflex save from Mullin's near-post flick before Morecambe were handed the points through Halford's bizarre intervention.