Oldham Athletic bounced back from successive defeats to leap into second spot in the League One table after surviving a few nervous moments against Northampton Town.
The Latics appeared to have the points in the bag thanks to Richie Wellens' second minute strike, a goal from Paul Warne one minute before the break and Chris Porter's 19th of the season early in the second half.
Northampton - who were to suffer their first defeat under new manager Stuart Gray and their first loss in six matches - played their part in an entertaining spectacle and were on the scoresheet through Andy Kirk and debut loan signing Jordan Robertson.
The 18-year-old came on as a substitute at half-time for James Quinn and scored two minutes from the end to raise late hopes of at least a point.
This was always going to be difficult for Northampton who sold their top-scorer Scott McGleish to Wycombe Wanderers on Friday, but they rose to the challenge and were never far behind their high-flying opponents.
Oldham went in front with the first action of the match when Neal Eardley's cross from the right was only half cleared and Wellens struck a right-footed shot from the edge of the box which sneaked inside Mark Bunn's right-hand post.
The home side were level in the 24th minute when Andy Holt headed on a free-kick by Bunn and Kirk raced clear to slide the ball past Les Pogliacomi and into the far corner.
Northampton began to dominate but it was the visitors who turned around in front when Warne struck two minutes before the break.
The striker turned sharply to round off a good move which was started by Sean Gregan's pass out to Porter on the right.
Porter almost made it 3-1 straight after the break when he flung himself at an Eardley cross, but he made no mistake in the 58th minute when he headed the ball over the advancing Bunn and into an unguarded net.
Holt almost reduced the arrears with 20 minutes left when Eardley cleared his header off the line, while at the other end Porter was teed-up by Andy Liddell but shaved a post with his shot.
Robertson's magical moment arrived just too late to affect the balance when the young Sheffield United striker turned sweetly on to a pass from Joe Burnell and cracked the ball past Pogliacomi.