PITTSBURGH — One of Pittsburgh’s most solemn days began with hundreds coming together in anguish and grief in synagogues and at gravesides, to start the services for those killed as they prayed on the Sabbath. In the afternoon, they came together again, in shivas to honor the dead and comfort the living, and, later by the thousands, in solemn marches of protest around the Squirrel Hill neighborhood where the attack took place on Saturday.

This is the Pittsburgh that met President Trump, who arrived with members of his family on Tuesday.

The presidential visit, welcomed by some in Pittsburgh, unwanted or vigorously opposed by many others, began with a motorcade into the city and a visit to the Tree of Life synagogue. Mr. Trump lit memorial candles in a vestibule near where the shooting unfolded, and placed stones and white roses from the White House outside, in commemoration of those killed in an attack by a gunman full of anti-Semitic rage shouting that Jews must die.

But if Mr. Trump’s visit was intended to bring healing, it instead laid bare the nation’s deep divisions. Many protesters in Pittsburgh had no doubt of what one called “the dotted line” between presidential rhetoric and violence, though some people in the city have pushed back on the idea that Mr. Trump had fomented the atmosphere of anger. As the president moved around Pittsburgh, a largely Democratic city, the signs of discord were apparent.

[Rabbis tell us what they’re doing to secure their synagogues and comfort their congregants in the wake of the shooting.]