Deerfield Beach, Fla. (CNN) President Donald Trump and first lady Melania Trump, aiming to honor the victims of Wednesday's school shooting in Parkland, Florida, visited Broward Health North Hospital on Friday, the hospital where many of the victims were treated.

After the hospital visit, the Trumps traveled to the nearby Broward County Sheriff's Department headquarters and heralded the law enforcement officials who responded to the shooting.

"What a great job you've done, and we appreciate it very much," Trump said. "Everybody is talking about it."

He added: "I hope you are getting the credit for it because believe me, you deserve it. The job you have done is unparalleled."

After a senior officer in the room joked about giving the officers a raise, Trump agreed. "Give them a raise," he exclaimed.

The Trumps were joined at the headquarters by Florida's Sen. Marco Rubio, Florida Gov. Rick Scott, Florida Attorney General Pam Bondi and White House chief of staff John Kelly.

Trump told reporters at the hospital that he spoke to victims of the shooting, adding that it is "very sad something like that could happen."

The President, during the brief exchange, also heralded the efforts of hospital staff and first responders to save lives.

"It's an incredible thing," he said of the speed with which people were taken for treatment at the hospital after being wounded. "I want to congratulate them."

A White House statement said that the Trumps were visiting "to pay their respects and thank the medical professionals for their life-saving assistance" in response to shooting.

The Wednesday shooting at Marjory Stoneman Douglas High School killed 17 people. Many of those injured were taken to Broward Health North Hospital, including the shooter in the attack. The hospital, a level two trauma center, is nine miles from the high school.

The visit thrusts Trump into a role where he has previously struggled to strike the right tone: consoler in chief. The trip also could put the President face-to-face with people impacted by the shooting who have called on him to do something to curb that prevalence of guns in the United States.

Trump did not respond when asked at the hospital whether more gun laws were needed to prevent school shootings.

Trump's visit to Florida was not a last-minute add to his schedule; he'd been planning to spend the weekend at his Mar-a-Lago estate, some 40 miles from Parkland, as well as tout his infrastructure plan at a concrete plant near Orlando. The infrastructure event was canceled after the shooting.

But hours before the visit, there were no outward indications that the Trumps would be visiting the hospital. Dozens of reporters had been camped outside the hospital since Wednesday evening.

Aides originally intended for Trump to visit the shooting victims on Saturday, but it was determined that arriving at his lavish beachside home before paying respects to the victims might appear in poor taste.

Trump noted his home close to the shooting site during his remarks at the sheriff's office. He said he had been to Broward County "many times."

"I don't live very far away," he said. "I live right up the way."

He added that he decided to make the visit on Friday, in part, because of Rubio.

"Marco said, hey, he wants to go down early. We didn't want to wait. We didn't want to wait," Trump added.

The first lady also made brief remarks during the visit, telling the assembled officers, "Thank you all for what you do."

"Let's take care of them because they will go through a lot and what they are experiencing two days ago. And we need to take care of them," she said.

Before departing for Florida, Trump wrote on Twitter that he was meeting "some of the bravest people on earth - but people whose lives have been totally shattered." He also wrote he was "working with Congress on many fronts" but did not provide details, nor even specify if he was referring to gun control.

Trump did not address the shooting on Wednesday night, choosing instead to wait until Thursday morning to speak to the nation from the White House. There were conversations among Trump's aides about an earlier statement, but ultimately the White House determined it would be wiser to wait until more details were known about the situation.

When he did emerge in the Diplomatic Room, Trump delivered a somber statement that did not directly address the issue of firearms. Instead he spoke to children, who he said may be feeling "scared."

"I want you to know that you are never alone and you never will be," Trump said. "You have people who care about you, who love you and who will do anything at all to protect you."

In stopping near the scene of the massacre, Trump is following a well-worn pattern of presidents jetting to communities reeling from tragedy and attempting words of solace. But even some of Trump's closest advisers have admitted privately that consoling does not come naturally to the brash and sometimes impolitic President.

When he phoned the widow of a slain US serviceman in October, his attempted words of comfort fell flat when he told the mourning wife her husband "knew what he signed up for." And in the aftermath of hurricanes last year, Trump was criticized for overly valedictory remarks, even as thousands remained without power or food.

In both instances, criticism from those affected by the tragedies led to an indignant, outsized response from Trump, who is sensitive to accusations that he's not temperamentally suited for the office. The ensuing battles between Trump and people still healing from tragedy lasted days, if not weeks.

That scenario appeared ripe for repetition this week in Florida, where some students who attended Marjory Stoneman Douglas High School have loudly protested what they say is lack of action on the part of Trump and lawmakers to prevent gun deaths. Trump has not signed any gun control measures as President. A year ago this week he signed a measure that revoked an Obama-era rule that would prevent some mentally ill people from purchasing firearms.

"It's scary to think that these are the people who are making our laws when our community just took 17 bullets to the heart, and it just seems like the only people who don't care are the people making the laws," Cameron Kasky, a 17-year-old junior, said on Friday. He and his brother Holden survived Wednesday's school shooting.

"When politicians say now is not the time, I want to ask them: When is? How many more children need to die?" asked David Hogg, who is also 17 and a senior, as he looked directly into a CNN camera.

Even the President's beloved New York Post, a conservative Rupert Murdoch tabloid, trumpeted a front-page plea: "Mr. President Please Act. We need sensible gun control to help stop the slaughter."

Perhaps the most outspoken has been Lori Alhadeff, whose 14-year-old daughter, Alyssa, was shot and killed on Wednesday.

"President Trump, Barron goes to school. Let's protect Barron," she said on CNN, referring to Trump's own 11-year-old son. "And let's also protect all these other kids here in Parkland, in Florida and everywhere else in the United States of America."

"You need to help us now!" she went on, her voice crescendoing. "We need security now for all these children that have to go to school. We need action. Action! Action!"

Alhadeff held her daughter's funeral on Friday.