The man accused of killing 17 people at a Florida high school should be executed, Florida Republican Senator Marco Rubio has said.

“The answer is yes,” Senator Mr Rubio said after being asked whether suspect Nikolas Cruz should be given the death penalty if convicted, noting that “I’d imagine most people” would agree.

An attorney representing Cruz, who has been charged with 17 counts of premeditated murder over the shooting at Marjory Stoneman Douglas High School in Parkland but has not yet entered a plea, told reporters his client is willing to plead guilty in an effort to avoid the death penalty.

But State Attorney Michael Satz said in a statement that a case like Cruz’s “is the type of case the death penalty was designed for”.

“This was a highly calculated and premeditated murder of 17 people and the attempted murder of everyone in that school,” Mr Satz 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

An arrest document alleges that Cruz admitted to having been “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”.

The FBI has said it received a tip earlier this year that claimed Cruz "had the desire to kill" but failed to investigate fully.