An Egyptian-born college student indicted on explosives charges may be released from custody on $200,000 bond and under numerous conditions, including 24-hour electronic monitoring and surrender of his passport, a judge ruled Friday.

Youssef Samir Megahed's entire immediate family also must surrender their passports and relinquish their U.S. Constitutional right so authorities can search their home at any time, for any reason, a U.S. District Court magistrate said.

Megahed also was ordered to have no access to the Internet .

Megahed, 21, and Sherif Mohamed, 24, were indicted Aug. 31 on federal charges of transporting explosives across state lines. Mohamed also faces terrorism-related charges for allegedly demonstrating how to use the explosives.

The students were arrested on state charges of possession of an explosive device following an Aug. 5 traffic stop in South Carolina. The state charge was dropped following the federal indictment.

Prosecutor Jay Hoffer said authorities found three pieces of piping cut into small sections in the trunk of a car Megahed was traveling in, each filled with a "potassium nitrate explosive mixture."

Also found in the car were 20 feet (6 meters) of fuse, a box of .22 caliber bullets, a drill that could have been used to "perhaps insert a fuse" into the explosive devices, and a partially filled 5-gallon gasoline container, Hoffer said.

A video found on a laptop in the car, which Mohamed has acknowledged he made, shows "how to turn a radio controlled car into a detonator that could be used for an explosive," Hoffer said.

The men say the explosive materials were simply for homemade fireworks.

Megahed's public defender, Adam Allen, said his client had "zero criminal history" and had lived a "completely law-abiding life."

Megahed is a permanent resident of the United States who lives in Florida with his family.

Mohamed was in the U.S. on a student visa. He remained in federal custody after waiving his right to bond.

It was not immediately clear how soon Megahed would be released. His family, who attended Friday's hearing, declined to comment.