The president also singled out for praise the first responders and doctors who rushed to save lives, saying "America is truly a nation in mourning." His appearance in the city came just days after a gunman holed up on the 32nd floor of a hotel and casino opened fire on a crowd at an outdoor country music festival below. At least 58 people were killed and more than 500 were injured from the gunfire and the chaotic situation as concert-goers tried to flee.

Trump at one point spoke of families who "tonight will go to bed in a world that is suddenly empty."

"Our souls are stricken with grief for every American who lost a husband or a wife, a mother or a father, a son or a daughter," he told them. "We know that your sorrow feels endless. We stand together to help you carry your pain. "

It was a somber address from a provocateur president who prides himself on commanding strength but occasionally has struggled to project empathy in times of tragedy.

Trump's solemn words in Las Vegas offered a sharp contrast to his trip a day earlier to hurricane-ravaged Puerto Rico, where he spoke of the "expensive" recovery effort on the island and noted the relatively low death toll there compared with "a real catastrophe like Katrina" in 2005.

In prepared remarks, he spoke of the courage displayed by those who risked or lost their lives saving loved ones and total strangers. He described an eyewitness account of police officers standing as bullets slammed around them and trying to direct concert-goers to safety.

Trump also described a military veteran who had rushed to the scene in search of loved ones, but quickly turned to helping victims, using plastic barriers as gurneys for the injured and frantically searching for anything he could use to make splints.

"The example of those whose final act was to sacrifice themselves for those they love should inspire all of us to show more love every day for the people who grace our lives," Trump said.

The president spent about four hours in a city still reeling from the worst mass shooting in modern American history.

His first stop was the University Medical Center, where he spent over 90 minutes visiting with recovering victims, some with severe injuries, and listening to their stories. While a serious visit, White House spokeswoman Sarah Huckabee Sanders said there was laughter and celebration in some of the visits with some of the families affected by the shooting. Trump also met with about 100 medical professionals.

Sanders said the visit was a moving experience for the president, who lingered at the hospital longer than planned.

He said after the visit that he'd met "some of the most amazing people" and invited them to visit the White House.

Generous with superlatives, Trump also commended the doctors for doing an "indescribable" job.

One of the patients who met with Trump told The Associated Press he was "super nice and super caring."

Tiffany Huizar, 18, a high school student who lives in Santa Ana, Calif., is recovering from bullet wounds in the stomach and elbow. She said Trump "was very comforting and like a father figure. ... I feel like a lot of people have negative views about him and what he posts on Twitter and social media and he was absolutely a different guy today in the hospital."

Trump did not visit the site of the shooting, but on his trip from the airport, his motorcade drove past the Mandalay Bay hotel where the gunman carried the shooting rampage.

Trump has a long personal connection to Las Vegas — a city where his name is written in huge golden letters atop his hotel. He also campaigned extensively across Nevada during his presidential campaign, drawing large crowds to rallies along The Strip.