President Donald Trump will visit Las Vegas today to try to soothe a city shaken by the deadliest shooting spree in modern US history in a trip that will test his ability to console a grieving nation.

His trip to Las Vegas will be the first time he has had to deal directly with the tragic aftermath of deadly gun violence that has routinely claimed hundreds of lives in recent years.

“It's a very horrible thing even to think about,” Trump told reporters on Air Force One on Tuesday. “It's really horrible.”

Stephen Paddock, a 64-year-old retiree with no criminal record, was identified as the gunman in Sunday night's mass shooting, spraying bullets from the window of his 32nd-floor room at the Mandalay Bay hotel in Las Vegas.

Authorities said 58 people were killed and more than 500 injured from a crowd of thousands gathered to watch an outdoor country music festival. Paddock's motive remained a mystery.

"He's a sick man, a demented man. A lot of problems, I guess. We are looking into him very, very seriously. But we're dealing with a very, very sick individual,“ Trump said of Paddock on Tuesday.

Trump has had mixed success in the traditional role of “consoler-in-chief.” He inflamed racial tensions in the aftermath of a white-supremacist rally in Charlottesville, Virgina, and he has struggled to strike the right tone in responding to hurricane devastation in Puerto Rico.

Visiting Puerto Rico on Tuesday, Trump said jokingly that the recovery from Hurricane Maria there was blowing the US budget “a little out of whack.” He spent most of his day meeting with people charged with responding to the crisis than with people affected by it.

The Las Vegas shooting has re-ignited a debate in Washington and across the country about whether more gun control legislation might have prevented what happened.

Republicans who control the US Congress have shown little inclination to respond to Democratic appeals for gun measures, although momentum appears to have slowed for legislation that would make it easier to buy gun silencers.

On the campaign trail last year, Trump aligned himself with gun rights advocates who consider the US Constitution's Second Amendment right to bear arms sacrosanct.

Asked on Tuesday whether it was time to debate gun control measures, Trump said: “Perhaps that will come. But that's not for now.”

Trump has responded to the Las Vegas massacre by holding a moment of silence on the White House South Lawn and ordering flags lowered to half-staff. He called the shootings “an act of pure evil.”

In Las Vegas, the President will grieve with friends and family of the victims, offer support for the wounded and thank first responders, the White House said.

Las Vegas shooting – in pictures Show all 15 1 /15 Las Vegas shooting – in pictures Las Vegas shooting – in pictures People scramble for shelter at the Route 91 Harvest country music festival after gun fire was heard Getty Las Vegas shooting – in pictures People carry a person at the Route 91 Harvest country music festival after shots were fired David Becker/Getty Las Vegas shooting – in pictures People run from the Route 91 Harvest country music festival after gun fire was heard David Becker/Getty Las Vegas shooting – in pictures A handout photo released via Twitter by Eiki Hrafnsson (@EirikurH) showing concertgoers running away from the scene (C) after shots range out at the Route 91 Harvest festival on Las Vegas Boulevard EPA/Eiki Hrafnsson Las Vegas shooting – in pictures People lie on the ground at the Route 91 Harvest country music festival after hearing gun fire Getty Las Vegas shooting – in pictures A man in a wheelchair is taken away from the Route 91 Harvest country music festival after hearing gun fire David Becker/Getty Las Vegas shooting – in pictures People stand on the street outside the Mandalay Bay hotel near the scene of the Route 91 Harvest festival on Las Vegas Boulevard EPA/Paul Buck Las Vegas shooting – in pictures FBI agents confer in front of the Tropicana hotel-casino after a mass shooting during a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures Las Vegas police run by a banner on the fence at the Route 91 Harvest country music festival grounds after shots were fired David Becker/Getty Las Vegas shooting – in pictures An injured person is tended to in the intersection of Tropicana Ave. and Las Vegas Boulevard after a mass shooting at a country music festival Ethan Miller/Getty Las Vegas shooting – in pictures Metro Police officers pass by the front of the Tropicana hotel-casino after a mass shooting at a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures A woman sits on a curb at the scene of a shooting outside of a music festival along the Las Vegas Strip AP/John Locher Las Vegas shooting – in pictures A cowboy hat lays in the street after shots were fired near a country music festival in Las Vegas Getty Las Vegas shooting – in pictures Las Vegas Metro Police and medical workers stage in the intersection of Tropicana Avenue and Las Vegas Boulevard South after a mass shooting at a music festival on the Las Vegas Strip Reuters/Las Vegas Sun/Steve Marcus Las Vegas shooting – in pictures Sheriff Joe Lombardo (2-R) speaking during a press briefing in the aftermath of the active shooter incident on Las Vegas Boulevard EPA

Trump has some strong ties to the desert city. He helped build the luxury Trump International Hotel, where he stays when he visits, and was a frequent visitor during the presidential campaign last year.

He lost the state to Democrat Hillary Clinton in the November 2016 presidential election.