South Africa batsman JP Duminy was considering retiring from Test cricket in January, when he was dropped for the New Year's Test against England, before he was talked out of it by Ashwell Prince, who was a selector at the time. Duminy ended a run of patchy form by scoring 141 in the second innings to give South Africa a 300-plus lead over Australia in the ongoing Perth Test.

"When he was dropped in January, he was considering retiring from Test cricket," Prince told ESPNcricinfo in Perth. "He had the conversation with me because the convener of selectors was not at the Cape Town Test, so I had to go and take him the news that he won't be playing.

"At that time, he was at a real low point and he was being honest and giving his feelings. As a selector, and with him being an important player to South African cricket, you try and convince him to think about it. I'm sure when he thinks back about that conversation this afternoon or this evening, he will know how he was feeling then and with the feeling he is having now, he will be happy that he carried on."

Duminy admitted that at that time he lacked direction, especially in Tests. "There was indifferent feelings. I wasn't sure where I was going in terms of my career but I am very grateful to get another opportunity."

He had gone 12 innings without a hundred when he was dropped, and in that time he had only passed fifty once. Like his team-mates, he struggled in India and with South African cricket itself on the wane, had several reasons to walk away. "It's difficult to pinpoint exactly what it was but he was out of form," Prince said. "With the type of calendar that they have these days, he has got a young baby, a young family, all that might have played a role."

That was when Prince reminded Duminy, who had replaced him in the 2008 Perth Test and made a half-century in a famous victory, of the prestige of the longest format. "I was talking to him as a friend, rather than a selector. I was making him understand how important Test cricket is for a player. You can play hundreds of ODIs and T20 and make millions but when you are done playing, you always think about what you did in the Test-match arena," Prince said. "You can play fifty ODIs quickly and not remember anything. These type of performances, that's what the game is all about."

During the conversation, Prince said Duminy told him that he needed "a bit of a break," and was going to take the New Year's week off but then he decided to play in a franchise first-class match. He scored a career-best 260. "I don't know what changed from him wanting a break and then playing in that match but he got 250 straight away and I think the next Test he was back in."

Faf du Plessis was dropped for the next game and Duminy returned but not with much success. He scored 19 and 29 against England at SuperSport Park and it was only when he struck 88 against New Zealand seven months later that it seemed he had found form again. Then, Duminy was able to realign his goals with his performances.

"The change came for me just before the West Indies tour," Duminy said. "I sat down and reassessed my goals. Test cricket has always been a big part of my goal setting and I knew I was at a crossroads in my Test career. I wanted to leave my Test career knowing that I've given it my all, and I committed to myself that I was going to give myself the best chance, so that was the difference. It was a personal thing. I didn't necessarily speak to anyone about it. I just sat down, wrote a few things down, where I want to go, what I still want to achieve."

In that match, played without the injured AB de Villiers, Duminy was moved to No. 4, which is where he has batted in this Perth Test, and the change of position might have led to a change in fortune.

"If you are at No. 6, 90% of the time, you are batting with the bowlers so you will always have to try and think how am I going to marshall my way through this innings," Prince said. "Do I trust them? Are they looking good on the day or are they looking like it's going to be a matter of time? You are taking everything into consideration, whether it's spinning, whether they are getting in line behind the ball. Maybe upfront he is a lot more relaxed, he has a lot more time to bat, he doesn't have to think should I attack more, should I defend more, or how the tail is lining up. He just has to bat."

For Duminy, the move to No. 4 refreshed his approach. "I was pleased with the opportunity. It is something I have always enjoyed in the first-class arena. To be given the nod to go ahead, especially with it being such a crucial position in the South African team, was a big positive for me and I knew I had to step up and fill some big boots. You had Kallis and AB de Villiers batting there before. Today [in Perth] was a step in the right direction."

But more than the change of position, Prince believed it was a mental shift that did the trick for Duminy. "I think its 100% mindset. I think maybe he has thought about and committed to wanting to do more in his Test career," Prince said. "In the first innings [in Perth] he came out looking to play more positively and maybe once or twice was a little loose, in the second innings he came out positive again but a lot more selective. His shot selection and his stroke play has been sublime."