Former England fast bowler Matthew Hoggard took a hat-trick at Hove to take Yorkshire to the brink of survival in the Division One as they beat Sussex by 156 runs.

Hoggard, who took a hat-trick for England against the West Indies in Bridgetown in 2004, had Andrew Hodd caught behind then sent Dwayne Smith's off-stump flying out of the ground and finally had Piyush Chawla caught at second slip.

It was the first Yorkshire hat-trick since Craig White performed the feat in 1998.

Hoggard, 32, who is out of contract at the end of the season and has been linked with other counties, had a day to remember.

Earlier, he hit five fours in an innings of 26 which helped take the Yorkshire score out of range for Sussex, who were desperate to win as they battle for top-flight survival.

And then, when Sussex batted, he ran out their in-form batsman, Rory Hamilton Brown, who had made an unbeaten 171 in the first innings, with a good throw from third man as Hamilton-Brown came back for a risky second run.

Yorkshire now need just five points from their final match against Hampshire to be sure of safety.

Meanwhile, Sussex face the prospect of relegation just two years after winning the County Championship for the third time in five years.

They had bowled out Yorkshire for 284 to set themselves a victory target of 240 at exactly a run a ball.

But after Chris Nash and Joe Gatting put them ahead of the rate, with a breezy opening stand of 37, Sussex were bowled out for 83, losing all ten wickets for 46 runs in the space of 20 overs.

Gatting was first out in the sixth over, when he pulled to midwicket.

Hamilton-Brown was out in the next over and when Murray Goodwin was caught behind, cutting, Sussex were 46 for three in the tenth over and the chase was realistically over.

But despite the fall of wickets they kept going for the win. Nash was caught behind off Ajmal Shahzad at 64 and Carl Hopkinson was bowled by the left-arm spinner David Wainwright at 71.

Then, with the score at 80, Hoggard took his hat-trick before Wainwright finished off the tail.

Hoggard finished with figures of four for 29 and Wainwright took four for 12 to add to the five wickets he took in the first innings and two important batting contributions.

Yorkshire resumed yesterday on 147 for two, a lead of 102, and lost the important wicket of Jacques Rudolph to the first delivery of the day, bowled by Chawla, the batsman playing on as he pushed forward.

Andrew Gale was fourth out at 185 when wicketkeeper Andrew Hodd caught him at the second attempt off Chawla.

And Yorkshire looked in trouble at 188 for five when Jonathan Bairstow was out in the next over, lbw to Smith as he tried to work the ball to leg.

While Anthony McGrath was at the wicket Yorkshire always looked capable of taking the match out of Sussex's reach.

But McGrath, playing forward, edged a leg-break to slip at 220 and without addition Ajmal Shahzad was seventh out as he bat-padded to the diving Michael Yardy.

At lunch Yorkshire were 230 for seven but Sussex made themselves favourites once more when they took the wicket of Gerard Brophy, who top-edged a sweep to backward square-leg, and, one run later, dismissed Azeem Rafiq, who was bowled by Smith.

But the last pair of Wainwright and Hoggard then came together to frustrate the Sussex bowlers, adding 38 in nine overs.