Wallin's body arrived in a Hercules at Ärna airport outside Uppsala shortly before 8pm on Tuesday to be met by his family, defence minister Sten Tolgfors, and a homecoming ceremony of Armed Forces' colleagues.
Several colleagues from Wallin's unit in Afghanistan accompanied their comrade's body.
With a sombre drum roll the assembled welcoming party awaited the Hercules plane as spotlights drowned the coffin, swept in a Swedish flag on the lowered ramp.
The soldiers enclosed around the stationary plane, with several home on leave from Afghanistan.
Supreme Commander Sverker Göransson accompanied the relatives and senior officers in approaching the ramp. Göransson climbed up to the coffin, lay a medal on performed a long salute for Wallin, the sixth Swedish citizen to die in Afghanistan.
The two soldiers seriously injured in a separate incident in Afghanistan on Monday remained in a stable condition.
One man, born in 1984 and from the Gothenburg area, has very serious injuries but his life is not deemed to be in threat. The other, a 29-year-old from Medelpad, has serious injuries.
In a further incident on Tuesday, Swedish troops came under fire near Darzab in Afghanistan. No one was hurt in the skirmish and the Swedes were able to call in air support and retreat without returning fire.
The Swedish soldiers involved in the gunfire are reported to belong to a so-called mentor group tasked with training Afghanistan army personnel.
A growing number of Swedes want the withdrawal of their troops stationed in Afghanistan, according to a survey published on Tuesday.
When asked "should Sweden bring home its troops from Afghanistan?", 47 percent of 1,000 people surveyed said "yes" and 36 percent said "no", according to a Sifo poll published in the Aftonbladet tabloid.
The remaining 17 percent said they did not know.
In a similar Sifo poll in July, 42 percent answered "yes" to the same question and 41 percent said "no".
Sweden is officially neutral and not a member of NATO, but has about 600 troops and civilians taking part in the NATO-led International Security Assistance Force (ISAF) battling the Taliban in Afghanistan.
The future of Swedish troops in Afghanistan is to be debated soon in the Swedish parliament.
The centre-right minority government is in favour of continuing and even extending the mission while the leftwing opposition wants to set an exit date.
The far-right Sweden Democrats have also said they want Swedish troops to be called home although they have yet to commit to which way they would vote on the issue.
According to a report in the Dagens Nyheter daily Tuesday, Prime Minister Fredrik Reinfeldt and Foreign Minister Carl Bildt -- a strong supporter of Sweden's participation in ISAF -- are about to reach a compromise with opposition leader Mona Sahlin on the issue.