Ashes 2019: England go close but Australia repel to draw second Test at Lord's
Having to bat 48 over to save the game, Australia were 132-3 in the 36th over, only to lose three wickets for 17 runs in the next five.
With the light fading and the tension rising, Archer tore in and spinner Jack Leach had the ball spitting from the rough, but Travis Head and Pat Cummins saw the tourists to 154-6.
Stokes' unbeaten 115 allowed England to declare on 258-5, setting Australia an unlikely 267 to win.
The visitors were without premier batsman Steve Smith, who was withdrawn from the match with a concussion sustained when he was hit by Archer on Saturday.
Once again England debutant Archer bowled with frightening pace, removing David Warner and Usman Khawaja in his first three overs.
Then, with the second ball he bowled to Marnus Labuschagne - the concussion substitute who replaced Smith - Archer dealt another vicious blow to the grille of the batsman's helmet with a delivery clocked at 91.6mph.
Labuschagne bravely battled to 59, but when he was contentiously caught by Joe Root off Leach, it began an Australia slide that also included an outrageous, acrobatic grab by Joe Denly to remove Tim Paine.
However, the light became so poor that Archer was prevented from bowling the final two overs from the Pavilion End and Australia kept their 1-0 lead intact.