It has not been a bad few days for Sussex coach Peter Moores.

Last Thursday he signed a new four-year contract which will give him the security to plan long-term success for the county.

Then on Sunday Moores saw his side beat Championship leaders Surrey for the first time since 1994 as Sussex took a massive step towards his short-term goal of ensuring there is Division One cricket at Hove next season.

That thrilling four-wicket win will doubtless strengthen his belief that the decision to resist Warwickshire's overtures was the right one.

A sense of loyalty to Sussex was certainly in his thoughts when Moores sat down to consider his options. He joined the county in 1984 and spent 14 seasons as a player before switching to coaching in 1998. His wife Karen and their two young children are settled in Hove and ties with the area are undoubtedly strong.

Warwickshire's interest in appointing Moores as successor to Bob Woolmer, who is leaving at the end of the season, was genuine. When Bears' captain Michael Powell clambered up to the TV gantry at Edgbaston and chatted with Moores for an hour or so during the sides' recent Championship game you can bet that what was going on in front of them was not the sole topic of conversation.

Powell was apparently impressed with the way Moores coached the last England A team during their tour of West Indies in 2001. Good English coaches are a rare breed in county cricket at the moment and the 39-year-old is regarded as one of the best.

Moores said: "The interest from Warwickshire was very flattering but I spoke to Karen and people at the club and there is a job here at Sussex which is only half-finished.

"Finishing it would be winning the Championship. We have done a lot of work to get where we are now which is a solid team but the challenge is to get to the top and be in the hunt for trophies and titles on a consistent basis.

"We're on the right road. Our Academy is in place, the new indoor school will open later this year and there are some really promising youngsters who have already established themselves or who are on the way through.

"Now is the time to up the ante and build another platform to launch ourselves from."

Sussex chairman David Green acted quickly when he got wind of Warwickshire's interest. Even if they had not approached him it is a fair bet that sooner or later another county would have cast envious glances in the direction of Hove.

"It would have been a tragedy had we lost Peter so I'm delighted he has agreed to stay with us and continue building on the success he has already achieved," said Green.

The new four-year deal replaces the two-year contract which Moores signed at the end of last season. It may be hard to believe now, but when Sussex finished bottom of Division Two a couple of years ago there were one or two people doing important jobs at the county who wanted him out.

His decision to commit himself to the club will be greeted enthusiastically by the players, none more so than captain Chris Adams. The pair work well together and it is rare that they have any sort of a disagreement on selection, tactics or preparation.

Adams said: "I spoke to Peter and said I thought he would do a good job if he decided to go elsewhere, wherever it was. Warwickshire are a county used to winning trophies and will doubtless continue to do so but by staying here and helping us try and achieve our ultimate goal which is winning the Championship will be far more rewarding.

"I think our relationship is unique. We very rarely disagree and bounce ideas off each other well and I would like to think that the success we have had is partly down to the relationship we've got."

So there was a double reason for Moores to raise his glass when he joined the players for a celebration drink after the Surrey win, but he knows the hard work has only just begun.

"It's nice to know that people at other counties rate you, but I want to see it through with Sussex. And if at the end of the next four years we haven't had the success I hope we can achieve it will probably be time for a change of coach anyway."