President Donald Trump struck a solemn tone after the deadly school shooting in Florida, describing a “scene of terrible violence, hatred and evil” and promising to “tackle the difficult issue of mental health”, but avoiding any mention of guns.

Taking up the now-familiar ritual of public consolation after terrible violence, Mr Trump spoke from the White House Diplomatic Room. In a slow, deliberate style, he sought to reassure a troubled nation as well as students’ families and shooting survivors in Florida.

“We are all joined together as one American family, and your suffering is our burden also,” Mr Trump said. “No child, no teacher, should ever be in danger in an American school.”

The president’s address came a day after a former student opened fire at the Parkland, Florida, high school with an AR-15 rifle, killing 17 people and injuring 14 more. It was the nation’s deadliest school shooting since a gunman attacked an elementary school in Newtown, Connecticut, more than five years ago.

At the Capitol, the usual divisions over gun laws were evident.

House Minority Leader Nancy Pelosi, a Democrat, said in a statement it was time for action. “Congress has a moral responsibility to take common-sense action to prevent the daily tragedy of gun violence in communities across America,” she said. “Enough is enough.”

Senate Majority Leader Mitch McConnell, a Republican, did not mention guns as he said the Senate would observe a moment of silence at noon. “To say that such brutal, pointless violence is unconscionable is an understatement,” he said.

Before he was a candidate, Mr Trump at one point favoured some stricter gun restrictions. However, early in his administration, he told the National Rifle Association he was their “friend and champion”. He signed a resolution passed by the Republican-led Congress blocking an Obama-era rule designed to keep guns out of the hands of certain mentally disabled people.

Mr Trump, who owns a private club in Palm Beach, Florida about 40 miles from Parkland, said on Thursday he was making plans to visit the grieving community. He praised teachers and emergency personnel and also offered a direct message to children.

“I want you to know that you are never alone and you never will be,” Mr Trump said. “You have people who care about you who love you and who will do anything at all to protect you. If you need help, turn to a teacher, a family member, a local police officer or a faith leader. Answer hate with love, answer cruelty with kindness.”

Mr Trump pledged that his administration would work with state and local officials on improving school safety, saying: “It is not enough to simply take actions that make us feel like we are making a difference, we must actually make that difference.”

Mr Trump, who did not speak publicly immediately after the shooting, weighed in on Twitter early Thursday, calling the suspect “mentally disturbed” and stressing it was important to “report such instances to authorities, again and again!” He tweeted about the shooting twice on Wednesday, expressing condolences and saying he spoke with Florida’s governor.

The president also issued a proclamation mourning the victims and ordering American flags at public buildings across the country flown at half-mast.

His predecessor Barack Obama tweeted to reiterate his belief that gun laws needed to be addressed.

Mr Obama tweeted: “We are grieving with Parkland. But we are not powerless. Caring for our kids is our first job. And until we can honestly say that we’re doing enough to keep them safe from harm, including long overdue, common-sense gun safety laws that most Americans want, then we have to change.”

The 19-year-old suspect, Nikolas Cruz, is a troubled teenager who posted disturbing material on social media. He had been expelled from Marjory Stoneman Douglas High School for “disciplinary reasons”, Broward County, Florida, Sheriff Scott Israel said.

A Twitter account apparently from a student at the school had earlier reacted angrily to Mr Trump’s initial suggestion of prayers in response to the tragedy.

(@chaddiedabaddie/Twitter/PA)(@chaddiedabaddie/Twitter/PA)

The account @chaddiedabaddie, which says it belongs to the girl attending Marjory Stoneman Douglas High School in Parkland, near Fort Lauderdale, replied: “I don’t want your condolences you f****** price (sic) of shit, my friends and teachers were shot.

“Multiple of my fellow classmates are dead. Do something instead of sending prayers.

“Prayers won’t fix this. But Gun control will prevent it from happening again.

She had earlier tweeted: “Today has been the worst day of my life. I’ve been crying helplessly for hours. Thank you to everyone for your support. I’m going to try to sleep now.”

Prince Harry engagementDonald Trump offered his ‘prayers and condolences’ to the families of the dead (Matt Cardy/PA)

Morgan Williams described on Twitter how her friends were killed as the gunman roamed through the school corridors.

She said: “I cannot stop hearing the sound of the gun as he walked down my hallway. I cannot unsee my classmates who were shot get carried out by police. I cannot unsee the bodies on the floor. Please keep in mind the horror of what we’ve gone through today. #prayfordouglas”

She added: “Never in a million years did I think I would have ever gone through this. There is no reason why I should have had to run past deceased friends and classmates to get to safety because there isn’t a control on how easy it is to get a gun.”

Other students posted social media footage of the siege under way.

One user, Aidan Minoff, appeared to be taking shelter under tables alongside his school mates.

He wrote on Twitter: “My school is being shot up and I am locked inside. I’m f****** scared right now”

(@TheCaptainAidan/Twitter/PA)(@TheCaptainAidan/Twitter/PA)