Two Egyptian students at the University of South Florida were indicted Friday on charges of carrying explosive materials across states lines and one was accused of teaching the other how to use them for violent reasons.

Ahmed Abdellatif Sherif Mohamed, 24, an engineering graduate student and teaching assistant at the Tampa-based university, faces terrorism charges for teaching and demonstrating how to use the explosives.

He and Youssef Samir Megahed, 21, an engineering student, were stopped for speeding Aug. 4 in Goose Creek, S.C., where they have been held on state charges.

The two men were stopped with pipe bombs in their car near a Navy base in South Carolina where enemy combatants have been held. They were held on state charges while the FBI continued to investigate whether there was a terrorism link.

Mohamed was charged with distributing information relating to explosives, destructive devices and weapons of mass destruction, which is a terrorism-related statute, a Justice Department official said. The crime carries a maximum of 20 years in prison.

He and Megahed both face with charges of transporting explosives in interstate commerce without permits, which carries a 10-year prison penalty. Their defense attorney, Andy Savage, did not immediately return a call seeking comment.

The indictment was handed up in Tampa, Fla.

In South Carolina, where Mohamed and Megahed have been held in the Berkeley County jail, U.S. Attorney Reginald I. Lloyd praised state and federal authorities for cooperating in the four-week investigation that initially did not look like a terrorism case.

"The arresting deputy's vigilance and the immediate response of our local investigators and prosecutors are highly commendable," Lloyd said in a statement.

Since the Aug. 4 arrest, authorities sought to determine whether Mohamed and Megahed were fledgling terrorists or merely college students headed to the beach with devices made from fireworks they bought at Wal-Mart in their car, as they claimed. The local sheriff in South Carolina said the explosives were "other than fireworks."

The charges follow several searches in Tampa, including of a storage facility and a park where the explosives might have been tested, authorities said.

Both Mohamed and Megahed are in the county legally on student visas, officials said.