Alastair Cook's 27th Test century and the fastest ever at Lord's from Ben Stokes transformed the first Investec Test as England went from a position of peril to one of dominance.
England arrived on day four with backs-to-the-wall defiance apparently the best they could hope for after conceding a 134-run first-innings deficit to New Zealand.
Stokes drove brilliantly down the ground too, and hit 15 fours and three sixes in his 85-ball century - the second of his career, just two days after he fell short with 92 in the first innings here.
England have stumbled to 361-8 after starting the day on 341-5.
Ben Stokes made it to 79, but was dismissed by Jerome Taylor for the first blow to England.
Nightwatchman James Tredwell amassed eight runs, while wicketkeeper Jos Buttler managed a 22-ball duck.
England all-rounder Ben Stokes has been ruled out of this month's World Twenty20 in Bangladesh with a fractured hand, the England and Wales Cricket Board said on Friday.
Chris Woakes has been added to the 15-man squad to replace Stokes, who suffered the injury when he struck a locker in the dressing-room following his dismissal in the Twenty20 international against West Indies in Barbados on Thursday.
"I am really disappointed to be missing out on going to a World T20 with England - it was a huge error in judgement following a frustrating tour for me and I deeply regret my behaviour," Stokes said in an ECB statement.
"I would like to wish the team all the very best in Bangladesh."