Majid was questioned by the Sapo intelligence service in Stockholm and freed on the orders of Sweden`s deputy terrorism prosecutor after 60 hours in custody.
Magistrate Hans Ihrman said Majid was "no longer under suspicion" of the offences for which he was arrested.
While media revealed Majid`s identity and published his photo, investigators had increasingly cast doubt on the idea that he fitted the profile of an attacker. He posted regular Facebook updates detailing his movements and activities.
"There were uncertainties about his identity and it took a while to confirm it through official records," Sapo said in a statement Sunday, adding that the false alarm illustrated "the dilemma which all intelligence agencies face, forced to act on partial information".
Sweden on Wednesday raised its national terror threat status to "high", the second-highest level on a five-point scale, and Sapo said the level remained unchanged following Majid`s release.
Sweden has not seen an Islamist attack since 2010 -- when a man blew himself up on a shopping street in Stockholm, injuring two people -- but authorities believe the country could be targeted by the Islamic State jihadists that claimed responsibility for the Paris carnage.
The government has introduced a package of measures to combat terrorist financing and the planning of attacks.
More about: