The Trumps paid their respects to the dead by lighting candles inside the synagogue's vestibule for each of the 11 victims of Saturday's massacre. They then laid stones atop makeshift memorial stars outside the building, a traditional Jewish mourning ritual, and also set down white flowers.

Trump and his family members afterward visited University of Pittsburgh Medical Center Presbyterian Hospital, where he met with four police officers who were wounded by the gunman.

Trump made the trip to Pittsburgh over the objections of some public officials and Jewish leaders who asked him to put off a visit, which has been the subject of controversy amid a national debate about gun violence, anti-Semitism and political hatred.

But the president was reportedly wary of being criticized for waiting too long to visit the city and he was greeted by the rabbi of Tree of Life upon his arrival.

Rabbi Jeffrey Myers previously told CNN that Trump was "certainly welcome" to make the visit, saying, "I am a citizen. He is my president."

Tuesday's trip was full of reminders of the storm surrounding Trump's presence.

Protesters carrying signs saying "hate has no home in Squirrel Hill" and imploring Trump to "stop encouraging hate" stood outside the synagogue in the city's Squirrel Hill neighborhood as the president arrived.

Local officials did not greet Trump at the airport after Air Force One landed, as they typically do when the president travels outside of Washington, D.C. Along the motorcade route, some onlookers gave Trump a thumbs down and others raised their middle fingers to him.

Pittsburgh Mayor Bill Peduto (D) had suggested that Trump delay his visit until the funerals for the victims were completed.

Trump has struggled to play the role of consoler in chief in times of national crisis, and his response to the Pittsburgh massacre has proven no different.

The president delivered a forceful condemnation of anti-Semitism in the immediate aftermath of Saturday's shooting but decided to go ahead with a campaign rally in Illinois that night.

Trump has previously declined to deliver unequivocal condemnation of neo-Nazis and other extremists in key moments, such as after last year's killing of a counterprotester at a white nationalist rally in Charlottesville, Va.

Robert Gregory Bowers, the alleged Pittsburgh gunman, echoed Trump's rhetoric on the migrant caravan, calling it a group of "invaders" in a social media post before the shooting.

Bowers railed against HIAS, a Jewish refugee resettlement organization he accused of helping bring people to the United States to carry out violence.