A survivor of the Parkland school shooting has challenged Florida senator Marco Rubio to turn down campaign donations from the National Rifle Association (NRA).

Cameron Kasky, a student at Marjory Stoneman Douglas High School where 17 pupils were gunned down a week ago, asked the politician in a live, televised debate: "Can you tell me right now that you will not accept a single donation from the NRA?"

The town hall audience erupted in cheers, before Mr Rubio went on to argue that voters buy into his agenda, not the NRA's, and that he supports laws to keep guns out of the hands of "deranged" people.

“I do support the Second Amendment. And I also support the right of you and everyone here to be able to go to school and be safe,” Mr Rubio said.

“And I do support any law that would keep guns out of the hands of a deranged killer, and that's why I support the things I have stood for and fought for.

“The influence of these groups comes not from money. The influence comes from the millions of people that agree with the agenda."

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

When Mr Kasky asked Mr Rubio whether he would continue to accept the NRA's contributions, the senator replied: "You can ask that question and I can say that people buy into my agenda."

Mr Kasky pushed him again, asking: “In the name of 17 people, you cannot ask the NRA to keep their money out of your campaign?”

Mr Rubio did not say whether he would turn down the NRA's money, but said "I can pledge to you that I will support any law that will prevent a killer like this from getting a gun."

Father of Florida victim: 'We, as a country, failed our children'

He was also put on the defensive by Fred Guttenberg, whose 14-year-old daughter Jaime was killed along with 16 other students.

Mr Guttenberg told Mr Rubio his comments about the shooting and those of Donald Trump "have been pathetically weak."

People stood and cheered Mr Guttenberg as he challenged Mr Rubio to tell him the truth, to acknowledge "guns were the factor in the hunting of our kids."

Mr Guttenberg added: "And tell me you will work with us to do something about guns."

Mr Rubio said the problems laid bare by the shooting rampage "cannot be solved by gun laws alone," drawing jeering whistles from the crowd.

The senator responded that he would support laws barring those 18 and under from buying such weapons, as well as support changing the background checks system and getting rid of bump stocks — an accessory which enables a rifle to shoot hundreds of rounds a minute.

He said if he believed an assault weapons ban "would have prevented this from happening, I would have supported it."