When the US entered World War I, the ONI's responsibilities expanded to include espionage, sabotage, and intelligence gathering on the Navy's potential enemies. In World War II the ONI became responsible for the investigation of sabotage, espionage and subversive activities that posed any kind of threat to the Navy.