Suspect Arid Uka, a 21-year-old ethnic Albanian from Kosovo, refused to talk when formally charged Thursday before a judge with two counts of murder and three counts of attempted murder, but made lengthy statements to police shortly after the Wednesday attack, prosecutor Rainer Griesbaum said.
Uka told authorities that he had gone to the airport specifically to kill Americans "as revenge for the American mission in Afghanistan," Griesbaum said.
He said a YouTube video he saw the day before the incident allegedly showing a raid on a home by U.S. soldiers in Afghanistan had inspired him to prevent "further cruelties."
When he saw the busload of 15 airmen parked outside Terminal 2, he approached an airman outside and, under the pretext of asking for a cigarette, asked if the servicemen were on their way to Afghanistan.
"When he said yes, he shot the 25-year-old serviceman from behind in the head," Griesbaum said.
Uka then stormed onto the bus, yelling "Allah Akbar!" -- Arabic for "God is great!" -- and shot the driver in the head, killing him as well, Griesbaum said.
He then shot a 25-year-old airman who was sitting on the bus twice, and then turned his gun on another airman, 21 and fired once, injuring both of them, Griesbaum said.
"Then he tried to shoot a 22-year-old," Griesbaum said. "He pointed his pistol at his head and pulled the trigger twice, but the pistol jammed and no shots came out."
Even though there were still six shots in the magazine, the jam prevented any further firing and Uka fled the bus.
The would-be final victim gave chase and caught up with Uka in the terminal at the same time as two German federal police officers and apprehended him.
He also was armed with two knives.
German authorities believe that Uka radicalized recently and acted alone -- but Griesbaum said the incident shows that there is a serious danger even if extremists are not part of a radical network.
"It underscores the danger of Islamists acting alone," he said.