Oldham 2-2 Everton
Oldham striker Matt Smith repeated his FA Cup heroics with a dramatic injury-time equaliser to force a fifth-round replay against Everton.
Substitute Smith, who scored twice as the League One strugglers shocked the Toffees' Merseyside rivals Liverpool in round four, bundled home a corner from close range in the dying seconds of an enthralling clash.
Goals from Victor Anichebe and Phil Jagielka had put the Toffees in charge after Jordan Obita gave the Latics an early lead, but David Moyes' men could not survive a frenetic finish.
Tim Howard denied Smith and Robbie Simpson with superb saves but, when the Latics sent their keeper Dean Bouzanis up for a last-gasp corner, Smith was in the right place to strike from close range.
Oldham parted company with manager Paul Dickov since they knocked out the Reds but, under caretaker boss Tony Philliskirk, they again punched above their weight and deserved their money-spinning replay at Goodison Park.
The pattern of this game was established early on, with Oldham working hard to contain an energetic Everton side, but also threatening on the break.
That was exactly the manner in which the Latics took the lead after 13 minutes. Leighton Baines saw his free-kick clip the top of the wall and deflect narrowly over and, from the resulting corner, Oldham struck from a classic counter-attack.
When the ball was cleared, Lee Croft span past Leon Osman on the half-way line and surged to the right-hand corner of the Everton area. Only Croft will know whether his final ball was a cross or shot but the Everton defence stood and watched it trundle past them, for Obita to fire home at the left-hand post.
That goal took the roofs off the three remaining stands at Boundary Park but it did not knock Everton out of their stride. They continued to fire a stream of balls into the Oldham box, and they did not have to wait long to draw level.
Anichebe made the most of a fortuitous bounce to turn inside Jean-Yves M'voto inside the Oldham area, but there was nothing lucky about his powerful finish which left Bouzanis standing.
There was another scare for the Toffees soon afterwards, with Obita seeing his shot deflected against the post after the ball broke to him in the box.
But Oldham's forays forward became ever rarer as the first half drew on, while Everton's superior possession translated into openings for Marouane Fellaini, who headed on to the roof of the net, and Nikica Jelavic, who could not get on the end of a long ball into the box.
The second half was only three minutes old when the Toffees took the lead. Kevin Mirallas, a half-time replacement for the injured Anichebe, delivered an inviting corner and Phil Jagielka planted his header past Bouzanis.
That should have been the beginning of the end of Oldham's Cup run but Everton's failure to finish off their opponents was to cost them dearly.
Steven Pienaar saw a shot saved, Leon Osman wasted a chance from a corner, Jelavic fired over - and the Latics battled on.
For long spells that was without reward but the introduction of Smith, who has not played since that Liverpool game because of a shoulder injury, was to change the game.
Moyes' refusal to discuss a new contract until the end of the season means his future at Goodison Park is uncertain and so is his side's fate in the Cup thanks to the former Manchester University student's late strike.
Smith brought a fine diving stop from Howard from the edge of the area and, after Simpson was also denied, he got on the end of a corner after Bouzanis distracted the Everton keeper.