Rory Hamilton-Brown is leaving Sussex to take over as captain as Surrey it was confirmed today.

The 22-year-old all-rounder is returning to the Oval after the two counties agreed a compensation package on the remaining year of his contract.

Sussex offered Hamilton-Brown, who had two years at Hove after leaving Surrey in 2007, an improved three-year deal.

But the lure of captaining the county with whom he played all his youth cricket and had three years on the professional staff proved too strong.

Earlier this week he described it as his "dream job." Last week Surrey cricket manager Chris Adams flew to South Africa to persuade him to join him at the Oval and his efforts have paid off.

Sussex coach Mark Robinson met Hamilton-Brown last Friday to try and keep him at Hove, arguing that his development and ambition to play for England would be better served staying at Sussex.

Robinson said: "Our aim since we signed Rory was to work on his undoubted potential to create an England cricketer and we believe that we have made good progress along that path.

"Our view remains that he would have been best served remaining with Sussex to achieve that ambition. However, Rory is adamant he would like to take this opportunity to captain Surrey and given the importance of our strong united team spirit in the dressing room, myself and the captain believe it is best for Sussex to allow him to move.

"Rory has been a pleasure to work with during his two seasons at Sussex and the whole coaching staff wish him all the best in his new role."

Once Hamilton-Brown had made his decision it was left to Sussex chairman Jim May and his Surrey counterpart David Stewart to agree a compensation fee which neither county will reveal because of a confidentiality agreement but which May described as "substantial."

May said: "We are disappointed that Rory has made this choice. The board and management were unanimous that Rory's best interest would have been to concentrate on his cricket unhindered by captaincy. It was only the exceptional circumstances - Rory's opportunity to become Surrey captain - that led us to reluctantly grant consent to his departure."