With only half a point separating the sides, Lehmann's innings was vital, and he reached his double century with a six off left-arm spinner PaulWiseman.
Chilton and Mal Loye both fell to the off-spin of PaulWiseman (4-87) before Horton and Yousuf put on 74 for the third wicket as the lead steadily grew.
Marshall's brother James survived to reach 33 not out and he managed to keep night-watchman PaulWiseman away from the strike in the final two overs before the fading light forced a halt.
Lumb was denied a third century of the campaign when he was caught at second slip, while Lehmann added only a single after lunch before playing across the line to spinner PaulWiseman and departing to a warm ovation.