With his international career seemingly winding down, and having been downgraded in Pakistan's central contracts list, the 37-year-old Hafeez had contemplated retiring. But his wife, and then Akhtar, convinced him not to.
On Sunday, making his comeback to the Test team after more than two years out, Hafeez scored his 10th hundred in the format, laying the platform for a solid first-day performance against Australia alongside opening partner Imam-ul-Haq. At the end of the day's play, Hafeez revealed how close he had come to giving up the game.
"I had a few problems in the last few months," he said. "I could have taken some steps, drastic, but I was stopped from taking them. I could have taken them, my wife stopped me. Shoaib Akhtar specially called me and at that time I was thinking of drastic steps as I was very disturbed.
"I think Allah is the best planner and he planned good things for me. I could have been something else this time. I probably think this is the place where I had to stage a comeback. When I came back in the team all the players welcomed me and gave me confidence, and that increased my inner energy so I am very happy at the comeback."
Hafeez has made multiple comebacks across formats, and this one was his fifth in Test cricket. The task of proving himself over and over, he said, brought the best out of him.
"Look, [even] Younis Khan had to prove himself, even in his last Test, so it happens with us," Hafeez said. "It's like this and it's tough to make [others] understand, and understand it yourself, how many times you have to prove yourself.
"You are challenged by that, your critics challenge you, and they wait for your bad performances and highlight them. That challenges you and it brings the best out of you. That has worked for me and Allah has helped me. I always want to play positive and leave behind all such things."
Hafeez was a last-minute inclusion in Pakistan's squad, but he said he had been expecting the recall, given his form in domestic cricket. He came into the Test team on the back of a double-hundred for his first-class team SNGPL.
"Don't know about the mindset because I was looking forward to take that challenge," he said, when asked what his mindset was like coming back into the team. "I was announced as 18th member by the management later on. I was playing domestic cricket and scoring runs so I was expecting a recall. I was in a positive frame of mind that I am going back into the team and that I will perform."
Having gone through a somewhat roller-coaster career, Hafeez spoke of wanting to finish his career "with respect".
"Look, whoever the player is, he wants to leave with respect, and that is my wish," he said. "I want to play with respect and end with respect. There are other avenues after that but whatever life is left in me I want to play for Pakistan and leave on a high."