Jos Buttler was 40 not out and Mark Wood 10 not out.
England, who resumed on 44 without loss, lost five wickets for 58 runs in 32 overs to be 102 for five at lunch on the final day.
Paceman Trent Boult and off-spinner Mark Craig took two wickets apiece before part-time spinner Kane Williamson had Ben Stokes caught behind on the stroke of lunch.
Moeen Ali (two) was bowled playing no stroke by Matt Henry before Williamson had Stuart Broad playing on for 23.
More From This Section
At tea, Williamson had taken three wickets for 15 runs in seven overs.
England now had to survive a minimum of 35 overs in the final session to hold out for a draw.
They lead the two-match series 1-0 after their 124-run victory in the first Test at Lord's last week.