German prosecutors said Wednesday's attack on U.S. Air Force security personnel aboard a bus outside Germany's Frankfurt Airport appears to be motivated by Islamic extremism.
Two U.S. airmen were shot and killed in the attack. Two others were wounded.
Eyewitnesses said the terrorist shouted "jihad, jihad" as he began firing.
The shooter was identified as a 21-year-old legal German resident who worked at the airport. Officials said the shooter was a Muslim immigrant from Kosovo.
The military said the airmen were traveling to Ramstein Air Base, where they were to be deployed to support an overseas operation.
"I'm saddened and I am outraged by this attack that took the lives of two Americans and wounded two others," President Barack Obama said.
At least 12 U.S. military personnel were on board the bus, parked just outside the international terminals.
German authorities said the gunman walked up to the bus, began arguing with some of the airmen, and then pulled out a gun and started firing while shouting "Allahu akbar," Arabic for "Allah is great."
After firing nine rounds, his gun jammed.
"I want everybody to understand that we will spare no effort in learning how this outrageous act took place," Obama said.
German Chancellor Angela Merkel vowed to do everything possible to investigate the incident.
The alleged gunman's family released a statement, saying they could not imagine how something like this could happen, because they feel Americans are their brothers.
The gunman is in custody, but German authorities will continue their investigation Thursday to see if the shooting is linked to a larger terror plot.