Fourth-placed Coleraine came from behind to beat Portadown 2-1 in the Premiership clash at Shamrock Park.
The Ports had taken the lead in the eighth minute when McMahon ran on to Gary Twigg's neat pass to score.
Former Portadown midfielder Neil McCafferty struck the top of the hosts' cvrossbar from a free-kick.
Jamie McLaughlin levelled for Coleraine with a low 71st minute shot and fellow sub Sammy Morrow coolly slotted in the winner three minutes from the end.
What they said
Coleraine's Sammy Morrow: "We had been well on top when we went 1-0 down, but we responded in a brilliant manner.
"The youth and exuberance in our squad is great and we can go for the 90 minutes.
"At the start of the season we felt we could achieve a top six finish.
"But the league tends to take shape around Christmas, so we will evaluate things later in the season."