James Anderson says that the injury that forced his withdrawal from England's tour of South Africa was the "most pain I've ever been in on a cricket field", but insists he may yet be fit to take part in the tour of Sri Lanka in March, after being diagnosed with a broken rib.

Anderson, who claimed 5 for 40 in the first innings of last week's second Test in Cape Town, was restricted to eight overs on the final day of England's victory push, and just two in the final session, after confiding to his team-mate Stuart Broad that he feared he had "ripped a muscle off the rib".

Speaking on his BBC "Tailenders" podcast, Anderson described how he first suspected he had a problem during an exploratory over with the new ball before lunch, but that it was his two-over burst immediately after tea, with England still needing five wickets to force victory, that confirmed his participation in the tour was about to end.

"I felt a bit of side soreness from the first Test," Anderson said. "I felt fine throughout that second Test, bowled six overs on the final morning and felt pretty good. We took the new ball just before lunch and it didn't feel right.

"I didn't bowl again until after tea. We needed some wickets and Joe [Root] asked if I was able to have a go.

"I was in the most pain I've ever been in on a cricket field. I couldn't pull through properly. It was hurting every time I bowled, so I knew there was something not right."

Anderson's initial fear was that the injury was a torn muscle, which would have entailed a lay-off of up to four months - and given that he was restricted to just four overs during last summer's Ashes after aggravating a calf injury, that sort of prognosis could well have jeopardised his preparations for this summer's home Tests against West Indies and Pakistan.

"I was saying to Stuart Broad 'I think there's something really wrong here' I thought I'd ripped a muscle off the rib, so a broken rib isn't the worst outcome"

"I was saying to Stuart Broad 'I think there's something really wrong here'," Anderson said. "I thought I'd ripped a muscle off the rib, so a broken rib isn't the worst outcome. A torn muscle would be anywhere from two, three or four months. A broken rib will hopefully be healed in three or four weeks."

The circumstances of the injury were something of a mystery to England's medical team, who initially assumed he must have been struck in the ribs while batting.

"I'd have remembered if I'd been hit," said Anderson. "They think it is through the constant force of me bowling. The muscles were strong enough, but the bone wasn't.

"They said it doesn't look like a stress fracture, it's actually cracked. They said they'd not seen one like this in a bowler before.

"It's just a case of waiting for the bone to heal. I can do anything that doesn't hurt, so hopefully my fitness won't drop off too much. I can still do stuff in the gym.

"Once the bone has healed, I can get straight back into it. It might be three weeks before the bone has healed properly, then I can get straight back into it."

Anderson's optimism confirms his hunger to fight back from this latest set-back and extend his Test career - he is currently 16 wickets shy of becoming the first fast bowler in history to reach 600 Test wickets.

ALSO READ: Ollie Pope leading the charge for England's young guns

And despite intimating recently that he would be willing to skip the tour of Sri Lanka in March - where he played a bit-part role last year in England's 3-0 series win - he is now hopeful of putting his name back in the frame, and dispelling any suggestion that, at the age of 37, his illustrious 17-year England career is about to come to an end.

"I'm not ruling out being fit for the Sri Lanka trip," he said. "Obviously I'm absolutely devastated not to be part of the last two Tests, especially having bowled really well in the second Test.

"I know a lot does get talked about as you get older, but it's more knowing within yourself. I thought I could still do it, but you don't know unless you do it on the field.

"That will help me through the next few weeks, knowing that I want to come back stronger and still play a part in this England side."

Anderson still managed to play an important role in England's victory push, taking the catch at leg gully to dislodge the obdurate Rassie van der Dussen for 17. And he was able to take pride in the progress of a young team featuring four players under the age of 22.

"I feel like we progressed as a team in that week and I'm sure they will continue to do in the next couple of games," he said. "It was a bit subdued from my point of view, but one of the best wins I've been a part of.

"Obviously it didn't end well, but it made all the hard work worthwhile, proving to myself that I can still do it.