|County Championship Division Two, Chelmsford|
|Close, day two: Yorkshire 312 & 44-3, Essex 177|
|Yorkshire 6pts, Essex 3pts|
Yorkshire bowled Essex out cheaply to close in on promotion to Division One of the County Championship.
The Tykes moved from 284-8 to 312 all out on day two at Chelmsford, before dismissing Essex for 177 to gain a 135-run first-innings advantage.
Ryan ten Doeschate's 62 helped Essex avoid the follow-on as Moin Ashraf took 4-36 and Azeem Rafiq collected 3-65.
Yorkshire, relegated in 2011, will return to Division One with a win but fell to 36-3 in their second innings.
The Tykes finished on 44-3, Essex's Graham Napier taking 3-14, and hold a 179-run lead with seven second-innings wickets remaining going into the third day on Thursday.
At the start of Wednesday's play, Azeem Rafiq, 49 not out overnight in Yorkshire's first innings, reached his half-century but fell for 53 as Yorkshire moved past the 300-mark to collect three batting points.
Essex slumped to 34-4 in reply with Jaik Mickleburgh, Tom Westley, Mark Pettini and Owais Shah all dismissed cheaply.
Ten Doeschate was the only home batsman to score more than 20 but his dismissal sparked another mini-collapse with three wickets falling in six balls.
However, 20-year-old Tymal Mills, who was born in Yorkshire, made an unbeaten 20 not out to guide Essex past the follow-on mark of 163.
The visitors then lost Joe Root, Phil Jaques and Andrew Gale early in their second innings, with Napier collecting all three wickets.
Even if Yorkshire fail to win, they can only be denied promotion if Kent beat Glamorgan, an outcome that looks unlikely with the Welsh side in control after the first two days in Cardiff.
As well as gaining promotion, the Tykes will also seal the Division Two title if they win and current leaders Derbyshire fail to beat Hampshire.