The IRGC added that the United States pledged to prevent such incidents.
The US marines were taken to international waters and freed, according to Iranian state broadcaster IRIB said.
Pentagon said Wednesday that the United States would investigate the incident.
"The Navy will investigate the circumstances that led to the sailors' presence in Iran," the Pentagon said in a statement.
According to Reuters citing a US military, the sailors later had been picked up by a US Navy aircraft and brought to the shore.
On Tuesday, a US Department of Defense official told Sputnik that Tehran assured Washington the two US naval vessels would be permitted to continue their trip to Bahrain once they were released.
Iranian media reported on Wednesday that Iranian Foreign Minister Mohammad Javad Zarif had discussed the issue with his US counterpart John Kerry and demanded an apology for the "violation" of Tehran’s sovereignty.