A gunman unleashed a hail of bullets at two military sites a few kilometers apart in the US state of Tennessee, killing at least four US marines before he was shot dead by police.
The attacks sent service members scrambling for cover as bullets smashed through the windows.
Authorities said they were investigating the possibility of a terrorist act, but had no evidence yet that anyone but a lone gunman was involved.
The gunman was identified as Muhammad Youssef Abdulazeez (24), of Hixson, Tennessee. An official said there was no indication that he was known to federal law enforcement.
The attacks took place minutes apart, with the gunman stopping his car and spraying dozens of bullets first at a military recruiting centre, then driving to a nearby navy-marine training base 11km away. The attacks were over within 30 minutes.
The gunman fired from inside his car when he went to the recruitment centre, but then got out of the vehicle to shoot the four marines at the training centre, FBI agent Ed Reinhold said.
In addition to the Marines killed, three people were wounded, including a sailor who was seriously hurt.
Mr Reinhold said Abdulazeez had "numerous weapons" but would not give details. He said investigators had "no idea" what motivated the shooter, but "we are looking at every possible avenue, whether it was terrorism, whether it's domestic, international, or whether it was a simple criminal act".
He also said "there is no indication at this point that anybody else was involved".
Within hours of the shootings, law enforcement officers with guns drawn swarmed what was believed to be Abdulazeez's house, and two women were led away in handcuffs.
A dozen law enforcement vehicles, including a bomb-squad truck and an open-sided army lorry carrying armed men, rolled into the Colonial Shores neighbourhood of Hixson and police closed off streets and turned away people trying to reach their homes.
Abdulazeez graduated from the University of Tennessee at Chattanooga in 2012 with a bachelor's in electrical engineering and was a student intern a few years ago at the government-owned utility that operates power plants and dams across America's south.
The US National Counterterrorism Centre said it had seen no connection so far to any terrorist organisation.
But it noted that the Islamic State (IS) group has been encouraging extremists to carry out attacks in the US and several such home-grown acts of violence or plots have been uncovered in recent months.
In addition to the wounded sailor, a marine was wounded in the leg and a police officer shot in the ankle.
In Washington, President Barack Obama pledged a prompt and thorough investigation into the "heartbreaking" attack and said the White House had been in touch with the Pentagon to make sure military installations are being vigilant.