The ship was being escorted by the US armed forces as it crossed the Strait of Hormuz considered illegal by Iran.