A shoulder injury to Dale Steyn has thrown South Africa's World Cup preparations off track, with the 35-year-old fast bowler cutting his time with Royal Challengers Bangalore at the IPL short after only two games.

Steyn will return to South Africa after his right shoulder - which had previously been seriously injured - flared up. He will be assessed by a shoulder specialist, with Cricket South Africa putting measures in place in an attempt to get him ready for the World Cup next month.

"Dale felt discomfort after playing his second match at the tournament," explained South Africa team manager, Dr Mohammed Moosajee. "Upon assessment and subsequent investigations, a flare-up of his right shoulder was confirmed. With the World Cup around the corner, it is our priority to get him back to full fitness before the squad departs on May 19. He will consult with a shoulder specialist upon his return and a recovery plan will be put in place."

Having gone unsold at the IPL 2019 auction, Steyn was a late addition to Royal Challengers' roster. He jetted in as a replacement for Nathan Coulter-Nile, who pulled out of the tournament with a stiff back. Royal Challengers won both the matches Steyn played in, with the fast bowler taking 2 for 40 against Kolkata Knight Riders and following that up with 2 for 29 in the one-run win over Chennai Super Kings.

"Dale Steyn has been prescribed ample rest due to inflammation in his shoulder," said Royal Challengers chairman Sanjeev Churiwala. "On account of state of his health, Dale will not be available to take part further in the ongoing season of IPL.

"His presence has helped the team immensely and we are very thankful for the inspiration and passion that he brought to the squad. The team will deeply miss his energy and presence around. We wish him a speedy recovery and all the luck for all future endeavours."

Steyn has been named in South Africa's 15-man squad for the World Cup, but it is unclear yet how much time he will take to recover. South Africa's squad will assemble for their week-long camp on May 12, prior to their departure for the tournament.

Worryingly, Steyn's current injury has flared up in the same shoulder in which he snapped a coracoid bone during South Africa's tour of Australia in November 2016. That injury almost ended his career, and required surgery and 13 months in recovery. During the Wanderers Test match against Pakistan earlier this year, Steyn left the field early on the second day clutching the same shoulder, causing worries in the South Africa camp, but that injury scare did not prove to be serious, and he later returned to the field to help wrap up a 107-run win.

The full extent of the latest flare-up remains to be seen, but if Steyn is unable to recover in time to play in the World Cup, it could signal the end of his white-ball career. Steyn has hinted that he would retire from ODI cricket after the tournament, but has made clear his intentions to keep playing Test cricket.

The World Cup squad named by South Africa can be amended until 23 May, one week before their tournament opener against England at The Oval.

Liam Brickhill is ESPNcricinfo's South Africa correspondent