The Afghan soldier who fatally shot a U.S. major general on Tuesday had no sympathy for the Taliban, and his motives for the shooting are far from clear, according to his fellow soldiers.

Afghan officials have identified the attacker as Rafiqullah, who, like many Afghans, goes by one name. He opened fire on a delegation of NATO officials who were visiting the Marshal Fahim Military Academy outside Kabul. He killed Maj. Gen. Harold Greene and wounded 15 other NATO service members who were visiting the compound. Four Afghans were also wounded.

After so many insider attacks in recent years, there was an immediate suspicion that the shooter may have been a member or a sympathizer of the Taliban.

Rafiqullah was an army soldier and worked as one of the security guards at the academy, which is the Afghan version of West Point. Students spend four years there and graduate as junior officers with the equivalent of a bachelor's degree.

Students we spoke with at the academy have theories, but say they aren't really sure why Rafiqullah, who was killed, opened fire.

Rafiqullah, 25, came from a poor family in the eastern province of Pakitya and had been in the army for three years.

"He was a practicing Muslim, a devout person, but had no radical views," says one student of the academy who spoke on condition of anonymity since he was not authorized to speak with the media.

He and others say Rafiqullah had no links with the Taliban. Indeed, he was angry with the group because he was not able to travel home freely due to their threats.

One of Rafiqullah's close friends was with him shortly before the shooting and said he could not sense anything unusual about Rafiqullah's behavior.

Students say Rafiqullah was bothered by the fact that British men were training female Afghan officers at a neighboring compound.

"He had seen the Afghan girls during the training sessions with their British mentors," says another student, also speaking anonymously. "He didn't like the idea that they were doing daily jogging and military training with foreign mentors."

"My friends and I think that Rafiqullah might have had family problems," says the first student. "He was tired and fed-up, or he might have committed this act because of religious sentiments over the liberal way women and girls live in the other facility."

Students say Rafiqullah had just completed watch duty when the Afghan garrison commander gave orders to collect the weapons from all the soldiers. About 20 minutes before the shooting, they say, Rafiqullah snuck off with his M16 rifle and hid in a bathroom.

He opened fire from the bathroom window. Students say they don't believe Rafiqullah was specifically targeting Maj. Gen. Greene.

Greene is the highest ranking U.S. officer killed during war since Vietnam, and this was his first combat deployment. Greene, who held a doctorate in materials science, previously served as commander of the Soldier Systems Center in Natick, Mass. The facility designs food and equipment for the military.

The insider, or "green on blue," attack that killed Greene was the second fatal attack this year. In 2012, there were more than 40 attacks by Afghan army or police forces that killed more than 60 NATO personnel, most of them Americans.

Insider attacks dropped off dramatically after the spike in 2012 as NATO and U.S. forces instituted a number of new security protocols, such as carrying loaded magazines in their weapons on bases and using "guardian angels" who provide security when NATO and Afghan forces interact. Insider attacks have also dropped because there are fewer foreign troops in Afghanistan.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.