South African batsman JP Duminy has retired from domestic cricket ahead of the 2019 ICC Cricket World Cup.

The 35-year-old will also call time on his ODI career after the CWC in England and Wales, which begins late this month.

Duminy will continue to be available for T20 cricket for South Africa and in international leagues, including the Mzansi Super League.

The batsman has spent much of the summer on the sidelines, recovering from surgery on his injured right shoulder, though he returned to competitive cricket with the World Sports Betting Cobras and was part of the squad that reached both the domestic One-Day and CSA T20 Challenge semifinals.

Duminy scored 6,774 runs, including 20 hundreds and two doubles, with his top score of 260 not out coming in his final first-class game for the Cobras at Boland Park just over three years ago. He has also scored 7,408 runs in 269 List A games at an average of 38.78.

While his rehabilitation and conditioning work on his right shoulder meant that Duminy could not be part of the early stages of Cobras’ CSA T20 Challenge campaign, he returned to play in their last three matches, his last game for the Cobras being the semifinal defeat to Warriors in East London.