Donald Trump has praised emergency services for their "incredible" work after visiting some of those wounded in the mass school shooting in Florida.
The US President and First Lady Melania met with survivors of the shooting at Broward Health North Hospital, where he described the carnage as "very sad".
Asked if he had talked with the victims, Mr Trump told reporters: "I did indeed, and it's very sad something like that could happen."
Mr Trump had earlier tweeted he would meet with people "whose lives have been totally shattered".
The President also met with law enforcement officials at the Broward County Sheriff's office in Fort Lauderdale.
He told officers he hoped they were "getting the credit" for their response to the shooting at Marjory Stoneman Douglas High School, in which 17 people were killed.
But the unannounced visit to Parkland – around 50 miles north of Miami – came amid growing anger from parents and students in the south Florida city over a lack of movement to tighten up gun control laws.
On Friday, the FBI admitted it had received a warning last month that the 19-year-old gunman, Nikolas Cruz, could be planning a mass shooting, but that agents failed to follow it up.
In a statement, it said: "The caller provided information about Cruz's gun ownership, desire to kill people, erratic behaviour, and disturbing social media posts, as well as the potential of him conducting a school shooting."
The information provided by the caller "should have been assessed as a potential threat to life", it added.
Mr Trump is spending the long President's Day weekend at his Mar-a-Lago resort, which is not far from Parkland.
His nationally televised address on Thursday made no mention of guns, or of previous mass shootings.
Our entire Nation, w/one heavy heart, continues to pray for the victims & their families in Parkland, FL. To teachers, law enforcement, first responders & medical professionals who responded so bravely in the face of danger: We THANK YOU for your courage! https://t.co/3yJsrebZMGpic.twitter.com/ti791dENTy
— Donald J. Trump (@realDonaldTrump) February 17, 2018
Gun control advocates have criticised the easy access to AR-15 rifles, a civilian version of the US military M16.
More from Donald Trump
Millions have ben sold in the US, and AR-15 style rifles were used in mass shootings in Las Vegas, Sutherland Springs, Texas and Newtown, Connecticut.
Mr Trump has previously boasted of the support her receives from the powerful pro-gun National Rifle Association, which spent $30m to support his election campaign in 2016.