Mohammad Saif Ur Rehman Khan was ordered to stay in Chile and check in with authorities once a week. Prosecutors have three more months to develop their case, Judge Maria Carolina Herrera ruled.
Defense attorney Gabriel Carrion said the judge declined to charge Khan with associating with terrorists for lack of evidence.
Khan, who maintains his innocence, made a victory sign with his hand and said only "Viva Chile" to a crowd of reporters as he left the courthouse with his lawyer.
Khan was called in to the embassy so that he could be told that his U.S. visa was revoked. A State Department spokesman in Washington said he had been added to a terrorism watch list after the U.S. government received information about him.
A summary of the closed hearing posted on the judiciary's website Saturday said both TNT and tetryl - a chemical that boosts the power of explosives - were found on his cell phone and documents at the embassy, and that a police search of his room later found the same chemicals on his clothes, a suitcase and a computer bag.
But Carrion says the 28-year-old Khan is an innocent student of the tourism industry and Spanish, and that anyone can pick up traces of the chemical simply by living in a big, polluted city.
Prosecutor Xavier Armendariz said the judge found that Khan's detention was legal.
Chilean police have searched the apartment of an Egyptian man who prayed at the same mosque as Khan and continue to investigate people who associated with the suspect.
Khan's parents were traveling to Chile to support their son, according to leftist Sen. Alejandro Navarro, who said he persuaded the interior ministry to grant them visas.
Coverage of Terrorism and Pakistan