Centuries by Alastair Cook and Ryan ten Doeschate steadied Essex to a fourth Royal London Cup victory after a hat-trick by Jerome Taylor had ripped the heart out of their top order.

But from the depths of 19 for three, Cook and ten Doeschate ensured Essex posted a competitive 295 off their 50 overs – and that proved too much for Sussex, who finished 11 runs short.

Cook took his total to 317 runs in five one-day innings with a 131-ball 109, his second three-figure score of the season. He shared a fifth-wicket stand of 142 with ten Doeschate, who was run out off the last ball for 102 for 91 overs.

Chris Nash and Stiann van Zyl both scored sixties in Sussex’s reply, but no one went on to make the big scores that Cook and ten Doeschate had earlier.

Sussex failed to capitalise on a great start when West Indies international Taylor struck with the first three balls of his third over to underline why both captains would have put the other team in.

Varun Chopra was the first Essex batsman to go, chasing a wide one to give Michael Burgess a diving catch behind for two.

Tom Westley followed, attempting to withdraw his bat but only managing to offer a faint touch to the same combination for his second golden duck in successive innings.

Adam Wheater was the hat-trick victim when trapped plumb lbw on the back-foot playing down the wrong line. Taylor’s fourth ball of the over, however, was eased through midwicket by Dan Lawrence for four to offer some inspiration to the shellshocked Essex batsman.

The fourth-wicket pair of Cook and Lawrence set painstakingly about repairing the damage. They put on 65 runs in 15 overs to take the score from 19 for three to 84 for four in the 20th over before Lawrence pushed a return catch to spinner Danny Briggs’s fifth ball for 34.

Cook swept a hip-high delivery from Shahzad for his 12th four to reach a 122-ball century. He was finally out when he cut Jofra Archer backward of square to Shahzad. Ten Doeschate swatted a short delivery from Archer to reach three-figures from the penultimate ball of the innings and was run out from the last.

It was to be enough for Essex.