Updated

Nikolas Cruz, the suspected gunman in Wednesday’s shooting at a Florida high school that left at least 17 people dead, was living in a mobile home with a student for the last three months, his attorney said.

A portrait of the suspected gunman, a former student at Marjory Stoneman Douglas High School where the massacre occurred, began to emerge in the hours following the deadliest school shooting since Sandy Hook in 2012.

390c3b80-

Police said Nikolas Cruz, 19, allegedly opened fire at Marjory Stoneman Douglas High School in Parkland, Florida, on Wednesday.

Cruz was arrested without incident just over a mile from where he was suspected of killing more than a dozen people, the Broward County Sheriff’s Office said.

Police said Cruz used an AR-15 and had multiple magazines on him during the shooting. Cruz’s attorney, Jim Lewis, told the South Florida Sun Sentinel that the firearm was legally bought and Cruz already owned the gun when he moved in with a friend, a junior at the Parkland high school, three months ago.

“It was his gun,” Lewis told the newspaper. “The family made him keep it in a locked gun cabinet in the house but he had a key.”

The mobile home in Lantana, about 30 miles north of Parkland, where Cruz lived with the friend, drew a police presence late Wednesday, according to WPEC-TV.

The Broward County Sheriff’s Office, the Bureau of Alcohol, Tobacco, Firearms and Explosives and the FBI were investigating the mobile home, the Palm Beach Post reported. Authorities were reportedly notified of a possible explosive device at the property.

Cruz was adopted, along with his younger brother Zachary, by Lynda and Roger Cruz after the couple moved from Long Island, N.Y., to Broward County.

Lynda Cruz died Nov. 1 of pneumonia and Roger had died earlier in Nikolas’ life, according to the Sun Sentinel.

Barbara Kumbatovich, a family friend who lives on Long Island, told the Sun Sentinel she didn’t think there was a major issue with Cruz and was shocked to find out he was the suspected gunman.

“I know she had been having some issues with them, especially the older one. He was being a problem. I know he did have some issues and he may have been taking medication. (He) did have some kind of emotional or difficulties,” Kumbatovich told the newspaper. “(Lynda) kept a really close handle on both boys. They were not major issues, as far as I know, just things teenagers do like not coming home on time, maybe being disrespectful.”

Lewis told the Sun Sentinel that Cruz and his brother were living with a family in Palm Beach County, but Cruz was not happy and asked a friend from the Parkland high school if he could move in.

Lewis said Cruz was allowed to move in after Thanksgiving and was encouraged to take adult education classes. Cruz also got a job at a dollar store.

“The family is devastated, they didn’t see this coming. They took him in and it’s a classic case of no good deed goes unpunished,” he said. “He was a little quirky and he was depressed about his mom’s death, but who wouldn’t be?”

Cruz was described by former classmates as “weird,” “a little off,” and a “loner.” He had been expelled from the high school for “disciplinary reasons” and was also told he couldn’t bring a backpack on campus. School officials said he had been attending another school in Broward County after his expulsion.

Dakota Mutchler, 17, said he used to be close friends with Cruz but hadn’t seen him since Cruz was expelled from school. He recalled Cruz posting on Instagram about killing animals and said he had talked to him about doing target practice in his backyard with a pellet gun.

“The family is devastated, they didn’t see this coming."

— Cruz's attorney Jim Lewis

"He started going after one of my friends, threatening her, and I cut him off from there," Mutchler said. "I think everyone had in their minds if anybody was going to do it, it was going to be him.”

One student told WJXT-TV that “everyone predicted” the shooting.

“Honestly, a lot of people were saying it was gonna be him,” the unnamed student told the news station. He said kids joked around that the student would be the one to “shoot up the school.”

Another student told WSVN that the suspect is a "troubled kid" who has "always had a certain amount of issues going on."

Mike Watford, who graduated from the high school in 2016, told BuzzFeed News that "something definitely pushed [the suspect]" before he allegedly opened fire at the school on Wednesday.

Cruz, according to Watford, often said "how tired he was of everyone picking on him and the staff doing nothing about it."

Watford's brother, Giovanni, described Cruz to the news outlet as "a sketchy kid," who was "off" and "super stressed-out all the time and talked about guns a lot and tried to hide his face."

Wednesday's shooting at Marjory Stoneman Douglas High School was the 25th deadly shooting at a U.S. elementary, middle or high school since — and including — Columbine in 1999. There have been a combined 98 deaths as a result.

The Associated Press contributed to this report.