Former Sri Lanka batter Avishka Gunawardene has been named Sri Lanka's Under-19 coach until the end of 2022.

Gunawardene had been approached by the Afghanistan Cricket Board for the post of batting coach, and he had in fact agreed to take up the position temporarily, for the series that was meant to be played against Pakistan, in Hambantota, this month.

However, it is understood that Gunawardene had always hoped for a long-term role within Sri Lankan cricket, rather than an overseas appointment. The uncertainty around Afghanistan's cricket programme following the Taliban's takeover of the country in August had also prompted Gunawardene to back out of the role, leaving him free to take up the Under-19 job in Sri Lanka.

"The next Under-19 World Cup is just in January next year, so I've only got about 100 days to prepare the boys for that," Gunawardene told ESPNcricinfo. "A lot of these boys haven't played for the last 18 months [because of the pandemic], so there's work to do."

This will be Gunawardene's first major coaching role since being cleared of corruption charges by the ICC in May. Gunawardene has had previous stints with Sri Lanka's Under-19 team, and had also been the Sri Lanka A coach for several years, before being suspended after the ICC indicated he was under suspicion.

Gunawardene maintained his innocence right through the process. He remains the only figure to have had all charges against him cleared, from among the recent raft of former Sri Lanka players who have attracted such attention.

Andrew Fidel Fernando is ESPNcricinfo's Sri Lanka correspondent. @afidelf