A 24-year-old Kuwaiti-born gunman opened fire on a military recruiting station on Thursday, then raced to a second military site where he killed four United States Marines, prompting a federal domestic terrorism investigation. Three other people, including a Marine Corps recruiter and a police officer, were wounded, according to law enforcement officials. The Federal Bureau of Investigation identified the gunman, who also died Thursday, as Mohammod Youssuf Abdulazeez, who became a naturalized United States citizen and went to high school and college in Chattanooga, Tennessee. Although counterterrorism officials had not been investigating Mr. Abdulazeez before Thursday’s shooting, federal officials familiar with the inquiry said that his father had been investigated years ago for giving money to an organization with possible ties to terrorists. At a late night news conference, F.B.I. officials said that thus far they did not have “anything that directly ties” the suspect to international terrorist organizations. Attorney General Loretta E. Lynch said the F.B.I. was leading “a national security investigation,” and the United States attorney for the Eastern District of Tennessee, William C. Killian, said federal officials were “treating this as an act of domestic terrorism.” But he, like other federal officials, cautioned that the investigation would ultimately determine how the shooting would be classified. Law enforcement officers swarmed the sites throughout the day and said that they knew of no public safety concerns. SITE Intelligence Group, which tracks terrorist activities, said that Mr. Abdulazeez had this week posted at least two Islam-focused writings on a blog, including one in which he described life as “short and bitter.” He also said that Muslims should not miss “the opportunity to submit to Allah.” The separate rampages, at an armed services recruiting center and a naval reserve facility, were together the highest profile episode of violence at domestic military installations since April 2014, when three people were killed and more than a dozen were wounded at Fort Hood Tex. And the killings here came in yet another mass shooting, less than one month after nine people were killed inside a church in Charleston, S.C. Pentagon officials said the identities of the dead would be released after next of kin were notified. Mr. Abdulazeez was not on the government’s radar, but law enforcement officials said that his father had been under investigation years ago for possible ties to a foreign terrorist organization. At one point, a law enforcement official said that the father was on a terrorist watch list and was questioned while on a trip abroad, but that he was eventually removed from the list. The official cautioned that the investigation of the father was old and did not generate any information on the son and did not lead to charges against the father, the official said. According to interviews with three counterterrorism officials, the attack fits the pattern of assaults that the Islamic State terror group has called for, but investigators found no immediate ties to it or other terrorist groups. Investigators hoped that an analysis of the gunman’s computer, phone and accounts would reveal whether he was inspired or directed. Officials said that they expected the Islamic State to claim responsibility for the attack but said that a claim alone would not mean anything. Investigators said the shootings unfolded over about 30 minutes at midmorning, first at a military recruiting center on Lee Highway and later at a naval reserve facility on Amnicola Highway less than 10 miles away. According to officials, the gunman used multiple weapons and shot from his car at the recruiting center. All the fatalities occurred at the second scene, where Marines and sailors are trained for reserve duty. A witness told law enforcement officials that the gunman reloaded more than once there.