Mohammad Momani told Reuters the attacker also wounded six people, including two Americans, one of whom was in critical condition, before being shot dead shot by Jordanian security forces. The gunman did not commit suicide as security sources earlier said.
The incident occurred in a facility that mainly trains Iraqi and Palestinian forces on the outskirts of the capital Amman.
It took place on the 10th anniversary of al Qaeda suicide bombings that targeted three Amman luxury hotels, killing dozens of people in the worst militant attack in Jordanian history.
Jordan is a staunch U.S. ally and part of the Washington-led coalition that is trying to defeat Islamic State insurgents in Syria and Iraq, both of which border Jordan.
The country hosts several hundred U.S. trainers who are part of a military program to bolster the kingdom's defense, including the stationing of F16 fighter jets that use Jordanian airfields to hit Islamic State positions in neighboring Syria.
But the kingdom's role in the war against Islamic State has raise disquiet among some Jordanians about instability at their borders and fears that a stepped-up role in the campaign might lead to Islamist attacks in their country.
King Abdullah believes fervently that ultra hardline jihadists pose an existentialist threat to the kingdom.