Former Pakistan captain Rashid Latif resigned on Tuesday as a coach at the national cricket academy over spot-fixing comments and said that he had taken up a new job with the Afghan team.
The former wicket-keeper batsman resigned after authorities handed him notice over a statement he made about spot-fixing.
"This is to inform you all that after having discussions with the Afghan cricket authorities I have accepted their offer to become the head coach of the Afghan cricket team," he said.
Latif, who was until last month Afghanistan's batting coach, is taking over from fellow Pakistani Kabir Khan, who was coach until last month's tour of Scotland. He resigned over differences with the Afghan cricket authority.
Pakistani cricket has been rocked by an investigation against three of its top cricketers in Britain over the latest spot-fixing scandal.
The International Cricket Council (ICC) suspended test captain Salman Butt and bowlers Mohammad Asif and Mohammad Aamir after a tabloid newspaper said they had taken money to bowl no-balls during a Test against England in August.
Scotland Yard, London's police headquarters, is investigating the claims in Britain's News of the World newspaper, and has asked the Pakistan Cricket Board (PCB), England and Wales Cricket Board (ECB) and the ICC not to give statements about them until the inquiry is finished.
But Latif, who blew the whistle on match-fixing among Pakistan's national team in 1994 and testified against his fellow players in an inquiry four years later, spoke out last week.
Latif said the ICC and its anti-corruption unit were "powerless" in the fight against betting scams.
He also suggested that the ICC change its rules to curb corruption, and described the News of the World report as a "joint money-making exercise" by the newspaper reporter and the alleged bookie, Mazhar Majeed.
After his resignation Latif said in a statement, "As a former player and captain, people look up to me and expect me to speak honestly and without bias, and that I have done without meaning anything personal against anyone.
"I have taken the decision to resign after being issued a notice by the (Pakistan Cricket) Board for having given statements on the spot-fixing issue.
"I would like to make it clear here that while it is an honour to serve Pakistan cricket in any position, I can't remain quiet on a key cricket issue that could determine the future of our cricket."
Latif, 41, played 37 Tests and 166 one-day internationals in an illustrious career that also saw him campaign against corruption in the game.
He had been wicket-keeping coach at the academy since late 2008.
Latif quits Pakistan academy, becomes Afghan coach
Advertisement