Super-sub Yohann Lasimant struck in injury time to secure a last-gasp 2-1 win at Gillingham and ensure League One leaders Leyton Orient ended a run of four matches without a win.
Lasimant, who only came off the bench in the 86th minute, headed home from close range to sink the Gills, who had taken a fourth-minute lead through Adebayo Akinfenwa.
Akinfenwa looped a header past Jake Larkins for his third goal in two matches but on-loan midfielder Marvin Bartley levelled 20 minutes from time for Orient with a header of his own.
Cody McDonald had hit a post in the opening 90 seconds for the hosts, while Larkins - on his league debut - made good saves to prevent the Gills striker and Jake Hessenthaler from extending the Kent side's lead.
Former O's goalkeeper Stuart Nelson saved Elliot Omozusi's low penalty after 31 minutes following Leon Legge's foul on Kevin Lisbie.
After the break Nelson then made a brilliant save to deny Dean Cox from 20 yards and Legge cleared Lasimant's 85th-minute volley off the goal-line.
Orient had temporarily been knocked off top spot with Brentford's early victory over Swindon but Lasimant's second goal of the season ensured they were not away for long.