In the spring of 1941, Kennedy volunteered for the U.S. Army, but was rejected, mainly because of his troublesome back. Nevertheless, in September of that year, the U.S. Navy accepted him, because of the influence of the director of the Office of Naval Intelligence (ONI), a former naval attaché to Joseph Kennedy. As an ensign, Kennedy served in the office which supplied bulletins and briefing information for the Secretary of the Navy. It was during this assignment that the attack on Pearl Harbor occurred. He attended the Naval Reserve Officer Training Corps and Motor Torpedo Boat Squadron Training Center before being assigned for duty in Panama and eventually the Pacific theater. He participated in various commands in the Pacific theater and earned the rank of lieutenant, commanding a patrol torpedo (PT) boat.