The man accused of opening fire at a Florida high school, killing 17 people, was a troubled former student who loved guns and was expelled for disciplinary reasons, police and former classmates said.
Nikolas Cruz was expelled from school, threatened fellow students and posted "very disturbing" messages on social media, along with pictures of his favourite guns.
But despite broad signs suggesting he was a deeply troubled young man, Cruz was able to return to his Parkland high school in Florida on Wednesday with an assault rifle and open fire, killing 17 students and adults.
A mugshot of Cruz, released after his arrest, depicts a young man seemingly little different from any other 19-year-old - cleanly-cut chestnut hair, hazel eyes, his face speckled with freckles.
But social media photographs unearthed in the wake of the shooting show a more disturbing side of the teenager.
The circulation of his Facebook and Instagram pages, with the latter featuring a photo of a concealed face wearing a red "Make America Great Again" cap, online has sparked the two social media platforms to remove his accounts.
"This is a terrible tragedy and our hearts go out to the people who have been affected. There is absolutely no place on our platforms for people who commit such horrendous acts," a statement read, according to a tweet shared by the Guardian US's Jon Swain.
The account featured photos of a person posing with a series of weapons with their face obscured as well as guns laid out on the bed and a box of rounds in other images.
Since the attack, the information emerging suggests there were red flags that should have set off danger alerts.
Fellow students knew he posted violent messages online.
And someone using the same name had published a comment on YouTube last year saying: "I'm going to be a professional school shooter."
That was reported to the FBI, but they never traced it back to Cruz.
Broward County Mayor Beam Furr said Cruz had been treated for a time at a mental health clinic, though he had not been back for over a year.
'A lot of problems'
Cruz arrived on Wednesday afternoon at Marjory Stoneman Douglas High School in a sprawling Florida suburb, north of Miami, just before school let out opening fire with an AR-15 semi-automatic rifle originally designed for combat.
Before he was expelled last year, he had a reputation among the 3000-strong student body as "weird" and "threatening", according to students and teachers.
"I met him last year, he was in my class at the beginning of the year and when I first met him I knew that something was off about him and he was kind of weird," Manolo Alvarez, 17, told AFP.
"People would bully him once in a while and spread rumours about him, like he was planning a school shooting, and nobody believed it. We thought it was just rumours until sadly it actually happened."
Dakota Mutchler, 17, told the Washington Post he began selling knives in school out of his lunchbox, and posted on Instagram about his guns and about killing animals.
His interest in guns would not have been extraordinary.
He had been a member of the Junior Reserve Officers' Training Corps, a government high school program that provides preparatory training for the military, including marksmanship.
But his behaviour eventually gave rise to strong concerns from the school administration.
According to another pupil, Nicholas Coke, Cruz had "a lot of problems", recalling an incident during middle school when Cruz kicked out a window.
'They didn't see this coming'
Jim Gard, a math teacher who had taught Cruz for a semester in 2016, told the Miami Herald teachers were notified he had been expelled and could not be permitted back on school grounds with a backpack.
"There were problems with him last year threatening students, and I guess he was asked to leave campus," Mr Gath said.
He clearly had a difficult childhood. Cruz was given up for adoption at birth in September 1998, along with a brother.
The adoptive parents were a couple in their 50s, according to local newspaper Sun-Sentinel.
His father died when he was still young, while his mother passed away last November, leaving the boys in the care of a family friend, according to the Sentinel.
Neighbours said he got in trouble repeatedly for minor incidents as he grew up and police were called a number of times, the Sentinel reported. One said he was seen shooting another neighbour's chickens.
When he moved in with another family after his mother died, they kept his legally owned AR-15 locked in a cabinet though Cruz had a key, according to family attorney Jim Lewis.
"The family is devastated, they didn't see this coming," Mr Lewis said, according to the Sentinel.
"He was a little quirky and he was depressed about his mom's death, but who wouldn't be?"