The suspect in a Florida school shooting may plead guilty in an effort to avoid the death penalty and allow a traumatised community to avert a protracted trial and move on, his attorney said.

“This is an opportunity to put the criminal case behind and help the victims' families begin to try and pick up pieces of their lives for our community to heal and to figure out how we stop these things from ever happening again,” Broward County Public Defender Howard Finkelstein told CNN.

Accused shooter Nikolas Cruz has been charged with 17 counts of premeditated murder after a massacre at Marjory Stoneman Douglas High School in Parkland. Mr Finkelstein told NBC his client was “willing to plead guilty to life without parole.”

While Mr Cruz has not yet entered a plea, arrest documents allege that he confessed to authorities he was “the gunman who entered the school campus armed with a AR-15 and began shooting students that he saw on the hallways and on the school grounds”.

Mr Finkelstein said the key question was now one of punishment.

“The only question is, does he live or does he die?” Mr Finkelstein said.

Florida shooting – in pictures Show all 10 1 /10 Florida shooting – in pictures Florida shooting – in pictures Police arrest a suspect in connection with the shooting at the Marjory Stoneman Douglas High School in Parkland, Florida Reuters Florida shooting – in pictures Parents wait for news after reports of a shooting at Marjory Stoneman Douglas High School in Parkland, Florida AP Florida shooting – in pictures Anxious family members wait for news of students AP Photo/Wilfredo Lee Florida shooting – in pictures Students being evacuated from the school AP Florida shooting – in pictures Students being evacuated from the school Getty Florida shooting – in pictures People gather waiting for word from students AP Florida shooting – in pictures Parents waiting for news on their children AP Florida shooting – in pictures People gather at a hotel where students were taken after the shooting Getty Florida shooting – in pictures Florida Governor Rick Scott speaks to the media as he visits Marjory Stoneman Douglas High School following the shooting AFP/Getty Florida shooting – in pictures Dr. Igor Nichiporenko, Medical Director Trauma, left, and Dr. Evan Boyer, Medical Director, Emergency Services, speak about treating victims and the suspect at a press conference outside Broward Health North hospital AP

In the days after the bloodshed in Parkland, a portrait has begun to emerge of a disturbed young man whose warning signs repeatedly went unheeded.

The FBI has admitted that it did not follow up on a tip that Mr Cruz had weapons and a “desire to kill,” and the South Florida Sun Sentinel reported that welfare and law enforcement investigators had looked into Mr Cruz cutting himself and discussing his desire to purchase a gun on social media.