An Afghan man who worked for Lithuanian troops in Afghanistan has been transferred to the Baltic country from a migrant camp in Greece after pleading for help on social media.

Abdul Basir Yousofy arrived in Vilnius late Wednesday after the government gave him a five-day visa and paid for his airfare from Greece.

The 22-year-old touched the hearts of many Lithuanians with a recent online video in which he asked the country's president and people for help in getting out of the Greek camp. He spoke in broken Lithuanian, which he had picked up working for Lithuanian troops in Afghanistan's Ghor province.

He can now formally apply for asylum in Lithuania, which has pledged to accept just over 1,100 refugees by 2017 under a European Union plan.