Former South Africa all-rounder Lance Klusener will step down as the head coach of Afghanistan team when his contract expires on December 31.
Klusener, who was appointed in September 2019, said he will not renew his contract.
"Having spent two years with the team, I will take away some memorable moments with me," he said in a statement on Monday.
"As I walk away from Afghanistan cricket team and its cricketing structure, I look forward to the next stage in my coaching career and opportunities it brings."
Klusener had taken over as Afghanistan coach from Andy Moles, who was serving in interim capacity after the exit of Phil Simmons following the 2019 World Cup.
Klusener's contract was then extended till the end of 2021.
Though Afghanistan hardly played any cricket in 2020 due to the Covid-19 pandemic, the team did reasonably well under Klusener, winning one out of the three Tests, three out of the six ODIs and nine out of 14 T20Is.
During his first series as head coach, Afghanistan beat West Indies 2-1 in the T20I series played in India. They also beat Ireland 3-0 in the ODIs and 2-1 in the T20I series earlier this year.
In the recently-concluded T20 World Cup, Afghanistan crashed out of the group stage after winning two out of their five matches.
Considered one of the best South African all-rounders during his playing days (1996 to 2004), Klusener scored 1906 runs and took 80 wickets in 49 Tests. He also scored 3576 runs and got 192 wickets in 171 ODIs.
He has taken up various coaching roles following his retirement, working with international and domestic teams as well as IPL franchises.