Three American students arrested in Egypt and accused of throwing petrol bombs during the current unrest in Tahrir Square have been released and will not be charged, a relative of one of the accused has said.

The three young men – Luke Gates, Gregory Porter, and Derrik Sweeney – had been picked up by the authorities during clashes near the Interior Ministry, Egyptian police had said.

The trio had also been shown on local television after their arrests, prompting fears they would be accused of being outside agitators in the violence gripping the Egyptian capital.

However, Joy Sweeney, the mother of Derrik, confirmed news reports that the three were set to be released shortly and charges against them would be dropped. "All three of them have been released. The attorney-general is not going to appeal," she told CNN on Thursday.

Sweeney said the news had been confirmed by the US consul general in Egypt, Roberto Powers. The diplomat had told her that the trio of students were now being taken to a local doctor for a medical examination and from there would go to a police station to have their paperwork processed ahead of being set free and returned to their student dorms.

Sweeney expressed her delight that the situation – which could have developed into a thorny diplomatic problem between Egypt and the US – had been resolved. "It is absolutely incredible. We are just so blessed and grateful right now," she said. Sweeney expected that her son Derrik, at least, would now be leaving the strife-torn country as Powers had warned that the students pictures had been displayed all over local news media and it might not be safe to stay. "It wouldn't be really be safe or prudent for him to be in the country," Sweeney said.

The three were in Egypt to study at the American University in Cairo. Gates is a 21-year-old exchange student from Bloomington, Indiana, who attends Indiana University, Porter, 19, is at Drexel University in Pennsylvania, and Sweeney attends Georgetown University and is from Jefferson City, Missouri.

"We are grateful for the news this morning that our student, Derrik Sweeney, and the other two American students have been released in Cairo. Our entire Georgetown community is deeply grateful to all those whose prompt attention and work led to their release," said Georgetown university president John DeGioia.

While in detention the three had been shown on Egyptian state television standing against a wall, looking scared, with pictures of their driving licences and ID cards spread out next to what the channel said were petrol bombs. Further footage, allegedly taken in Tahrir Square, showed demonstrators – at least one of whom was wearing a mask – with caucasian features, including a young man with blond hair.

Their apparent release is a dramatic turnaround by the Egyptian authorities who just hours earlier had appeared to be set to be held for at least four more days while police investigated the case.