Rock-bottom Port Vale now need a miracle to escape the drop after Oldham's Athletic's first win at Vale Park for 12 years.
The Latics, without an away win since they beat Everton in the FA Cup in January, started as though they were eager to put the record straight.
Gary McDonald and Chris Taylor had early efforts charged down before Jordan Robertson made the breakthrough in the 22nd minute.
David Livermore swung over a deep cross from the left and Robertson, who did look a yard offside, placed a smart volley beyond Joe Anyon's dive.
Vale suffered another blow when defender Keith Lowe limped off, but they did up their game as half-time approached and were inches away from a 41st minute equaliser.
The Oldham defence struggled to clear a right-wing corner and Kyle Perry struck a shot which was deflected against the crossbar, before the ball bounced to safety.
Perry also created a clear opportunity for strike partner Marc Richards five minutes after the break, but he dallied too long over his shot and Mark Crossley made the save.
And the luckless Perry was in the thick of the action again moments later when his left-foot strike struck the far post, with Crossley this time well beaten.
Vale continued their assault, with Perry leading the charge again as Crossley fumbled then recovered the ball in a goalmouth scramble.
But Oldham secured their victory in more controversy in the 78th minute when Pilkington was harshly penalised for a back pass after Anyon dived to save.
Taylor touched the ball to skipper Neal Eardley and his ferocious shot was deflected into the net.
Vale, to their credit, kept going and it took a terrific double save by veteran Crossley from Paul Harsley and Chris Herd to prevent what would have been a thoroughly deserved consolation goal.
But Oldham rubbed salt in Vale's wounds deep into stoppage time when substitute Matt Wolfenden chipped Anyon to make the final scoreline incredibly harsh.