Parkland (US): The troubled teen, authorities say, who killed 17 people at a Florida high school, excelled in an air-rifle marksmanship programme supported by a grant from the National Rifle Association Foundation, part of a multimillion-dollar effort by the gun group to support youth shooting clubs and other programmes.

Nikolas Cruz, 19, was wearing a maroon shirt with the logo from the Army Junior Reserve Officer Training Corps programme at Marjory Stoneman Douglas High School when he was arrested shortly after the shooting.

Former JROTC cadets told The Associated Press that Cruz was a member of the small varsity marksmanship team that trained together after class and traveled to other area schools to compete.

It was a close-knit group. One of the other cadets started calling Cruz "Wolf," and the nickname stuck.

File image of Florida shooting suspect Nikolas Cruz. Reuters

"He was a very good shot," said Aaron Diener, 20, who gave Cruz a ride to shooting competitions when they were part of the same four-member team in 2016.

"He had an AR-15 he talked about, and pistols he had shot. ... He would tell us, Oh, it was so fun to shoot this rifle or It was so fun to shoot that. It seemed almost therapeutic to him, the way he spoke about it."

The JROTC marksmanship programme used air rifles special-made for target shooting, typically on indoor ranges at targets the size of a coin.

Records show that the Stoneman Douglas JROTC programme received $10,827 in non-cash assistance from the NRAs fundraising and charitable arm in 2016, when Cruz was on the squad. The schools programme publicly thanked the NRA Foundation on its Twitter feed.

A spokeswoman for the NRA declined to comment on Friday. The top officers of the foundation are all current or former executives of the NRA.

The more than 1,700 high school JROTC programmes nationally also receive financial support from the US military and are typically supervised by retired officers from the army, aavy, air force and marines.

The military collaborates with school systems on the training curriculum, which includes marching drills, athletic competitions and shooting teams.

Cadets wear military uniforms with ranks and insignias similar to those of the military branch with which they are affiliated.

Peter Mahmood, the retired army major who supervises the JROTC programme at Stoneman Douglas, did not respond to messages left by phone and at his home.

Authorities say Cruz, who was expelled last year for disciplinary reasons, walked into his former school with an AR-15 and opened fire. He is charged with 17 counts of murder.

The shooting teams equipment came in handy for some students during the chaos of the rampage. Junior Colton Haab, a second lieutenant and platoon leader in the schools JROTC, told The Associated Press that he helped usher about 90 students into the room where cadets train with pellet rifles. Haab moved the Kevlar sheets used as a backdrop for target practice away from the wall and told everyone to hide behind them. As it was, the shooter never approached the ROTC rooms.

Haab said he sees nothing negative about the NRAs contribution to the ROTC programme. In fact, he said, the equipment the group funded could have helped save the students lives if the gunman had targeted them.

"So I think the NRA actually bonused us in a way," he said.

Former cadets say they were surprised the awkward teen they remember from a couple years ago now stands accused of slaughtering students and staff. But, in retrospect, there were signs of trouble.

Kyle Ramos, who was the executive officer of the JROTC battalion, said Cruz spoke about guns and knives incessantly and liked to wear military-style clothing to school. He also bragged about shooting animals for fun.

"He told me he would attack little animals with pellet guns and stuff, and I was a little weirded out by that," said Ramos, now 20.

"Like squirrels and lizards and stuff." Diener said Cruz sometimes missed target practice because he had detention. There was another time he remembers that Aaron Feis, a member of the schools security staff, came to get Cruz out of JROTC class because he was in some sort of trouble. Feis, who was also an assistant football coach at the school, is among those Cruz is charged with killing.

The NRA Foundation gave nearly $2.2 million to schools across 30 states in 2016, the most recent year for which its federal tax filings are publicly available.

Of that amount, more than $400,000 was in cash grants, while nearly $1.8 million came as in-kind donations ranging from equipment for high school air rifle teams to gun safety programmes for younger children.