(CNN) President Donald Trump paid a solemn visit Tuesday to grieving Pittsburgh , where some local officials said his presence was unwelcome and where shouts of protest could be heard in the distance as he viewed memorials to the murdered victims.

Trump went unaccompanied by a slate of elected leaders who declined invitations to join him. Instead he traveled alongside the first lady and prominent Jewish members of his administration -- including daughter Ivanka and son-in-law Jared Kushner -- to somberly lay stones atop the 11 Star of David markers planted in the ground outside the Tree of Life synagogue. The traditional Jewish practice was in remembrance of the victims of Saturday's shooting spree, the worst anti-Semitic attack in American history.

Trump was greeted at the scene by the congregation's rabbi, Jeffrey Myers, and Israeli Ambassador to the US Ron Dermer. He lit candles in the synagogue's entryway, but did not venture into the sanctuary, which is still considered a crime scene.

Trump spent around three hours on the ground, and made no public remarks. He appeared reverent while in public view, quietly placing small stones taken from the White House grounds on the white stars, while his wife placed single white rosebuds. Others in his entourage, including Ms. Trump, grew tearful, though the President remained stoic.

As he walked down the row of makeshift memorials, he was overheard ruminating on the tragedy at hand

"Very sad. Very very sad," he said. "Hopefully we will learn a lot from what happened."

Inside the University Pittsburgh Medical Center, the President spent roughly 80 minutes meeting with law enforcement officials wounded while responding to Saturday's attack. He also spoke with the hospital's care team, according to Dr. Donald Yealy, the hospital's chair of emergency medicine.

Yealy said the President also spoke with another patient in their hospital room and a family member of someone who had died at the shooting scene, though Yealy did not specify who. He added that the patients seemed grateful for the President's interest and visit.

Outside the synagogue and hospital, angry neighbors formed a march near where the President was paying his respects. Several carried signs objecting to Trump's visit, bearing slogans like "Words Matter," "Strength through Unity," "Watch Your Words" and "Hate does not work in our Neighborhoods."

It was a sign that Trump's presence in the city was not welcomed by many residents and local officials, who said they asked the White House to delay a visit until after the victims of the attack were buried.

The President went ahead with the stop anyway, joined by his Jewish daughter and son-in-law and Treasury Secretary Steven Mnuchin.

But most other officials who were invited to participate did not attend. Senate Majority Leader Mitch McConnell, House Speaker Paul Ryan, Senate Minority Leader Chuck Schumer and House Minority Leader Nancy Pelosi were all asked to join the President but did not take part in the visit, according to two congressional sources. Through their offices, McConnell and Ryan both cited scheduling conflicts.

Pennsylvania's two US senators were also not planning to join Trump in Pittsburgh. Sen. Pat Toomey, a Republican, was invited to join the President but declined, according to a spokesman, citing previous commitments in another part of the state. Democratic Sen. Bob Casey was not invited by the White House, according to his communications director. Casey will attend a vigil for the victims in southeastern Pennsylvania.

Pittsburgh Mayor Bill Peduto -- who said this week Trump should forestall a visit while burials begin -- also did not appear with Trump.

"Mayor Peduto's sole focus today is on the funerals and supporting the families," said Tim McNulty, Peduto's communications director.

McNulty said "there has been communication with the White House" about the President's visit, but added officials did not get final word about the timing of the trip until it was made public.

The timing

JUST WATCHED Pittsburgh Mayor: 'Our heart is broken' Replay More Videos ... MUST WATCH Pittsburgh Mayor: 'Our heart is broken' 05:28

With an 11-rally campaign itinerary set to begin later this week, there is little flexibility in the President's schedule. The President has insisted that his rallies for Republican candidates not be canceled following the shooting and has told aides he is itching to hit the trail.

On Monday evening, Peduto said on CNN that he advised Trump's aides that a visit on Tuesday was too early.

"We did try to get the message out to the White House that our priority tomorrow is the first funeral," Peduto told CNN's Anderson Cooper.

A White House official said on Tuesday there was a discussion about scheduling the visit later in the week -- perhaps on Wednesday or Thursday -- but the optics of visiting Pittsburgh on the same day as one of the President's campaign rallies weren't viewed as ideal.

And, the official said, the President was insistent on visiting Pittsburgh because he said he would on Saturday, long before anyone knew about objections from local officials.

Trump is scheduled to be in Florida on Wednesday night and Missouri on Thursday night, followed by two rallies a day on Friday, Saturday and Sunday. Finally, on Monday, he has three rallies.

The White House Office of Public Engagement, which is a liaison to local government officials and groups, is taking the lead on the Pittsburgh trip. An official says they still believe the trip can work by visiting law enforcement officials and perhaps the wounded officers still in the hospital.

All presidential travel comes with heavy security and logistics concerns; in the past, the White House has said visiting the sites of tragedies or disasters must come with consideration for events on the ground.

In addition to helping protect the President in Pittsburgh, police forces were also tasked Tuesday with guarding the funerals for victims began on Tuesday.

Political rhetoric

JUST WATCHED Rabbi has a powerful message for our leaders Replay More Videos ... MUST WATCH Rabbi has a powerful message for our leaders 01:27

Trump's visit comes amid a widening national debate over the President's rhetoric, including the angry and at times violent messages he espouses during campaign rallies.

In Pittsburgh, some progressive Jewish leaders have encouraged the President to stay home. In an open letter to the President, members of the city's "Bend the Arc" organization, a progressive group, wrote that his words and policies over the past three years "have emboldened a growing white nationalist movement," and that he is not welcome until he "fully (denounces) white nationalism."

But Myers, who was leading services at Tree of Life during Saturday's shooting, said on CNN's "New Day" Monday that "the President of the United States is always welcome."

"I'm a citizen. He's my President. He is certainly welcome," he said.

When Trump has met with victims' families after mass shootings or natural disasters in the past, he has conveyed a style of empathy that can sometimes feel stilted, particularly when compared to the freewheeling style he employs in most settings. He has yet to deliver a eulogy at a memorial service honoring the memories of Americans slain in gun violence or other attacks.

When Trump met with family members of the Parkland, Florida, high school shooting earlier this year, he was photographed clutching a notecard with handwritten prompts like "I hear you" and "What would you most want me to know about your experience?" -- a signal, at minimum, that some aides worried the usual signals of empathy may not come easily to him.

CNN's Julia Jones and Leslie Holland contributed to this report.