The attacker later explained that he “was going to shoot the guards and get into the castle to shoot the king," wrote the Aftonbladet newspaper at the time.
The guard was armed with a Glock pistol loaded with 16 rounds; however the 24-year-old was pulled away by passers by before the gun was removed from the bodyguard's holster.
Aftonbladet footage of the attack (in Swedish)
In court in September, the man was convicted of attempted aggravated robbery, assaulting a public official, and crimes against knife laws.
Due to the man's mental health, he was considered to be at a serious risk of relapse and was sentenced to a psychiatric evaluation in October.
He told psychiatrists at the time that he feared Sweden's King Carl XVI Gustaf was holding "secret information" and that he was involved in a conspiracy with the EU to ravage his home country.
However, as the man also faced deportation, he only needed clearance from a senior psychiatric official to be sent home and set free.
After a week of observation, the man was deported by the Swedish Prison and Probation Service (Kriminalvården) to Brazil where he was allowed to walk free.
“The journey is complete and he has been sent back. We got the verdict from the probation service,” said Mikael Agg of the border police to the Expressen newspaper.