Yorkshire opening batsmen Adam Lyth and Alex Lees comfortably moved their side to safety before lunch on day four against Somerset at Taunton.
The hosts advanced their first-innings score from 530-9 to 553 all out this morning before Steve Patterson trapped Craig Overton lbw. Craig Meschede finished with 59 as the hosts gained a lead of 103.
Despite the batting-friendly conditions, Yorkshire were still not out of the woods when they began their second innings – but they are now.
Lyth passed 5,000 first-class career runs on the way to 45 not out as Yorkshire reached lunch on 93-0 from 27 overs.
Lees, who hit Johann Myburgh’s off-spin for a straight six, reached 43 not out as the deficit was cut to just ten runs.
Somerset were hampered by the unexplained absence of seamers Alfonso Thomas and Overton from the field.