President Trump, who has called the media “the enemy of the people,” said Friday that journalists should be able to do their jobs without fear of violent attacks as he made his first public comments after the deadly shooting at the Capital Gazette office in Annapolis, Md.

“This attack shocked the conscience of our nation and filled our hearts with grief,” Trump said at the outset of an event at the White House marking the passage of the Republican tax plan six months ago. “Journalists, like all Americans, should be free from the fear of being violently attacked while doing their job.”

Trump spoke shortly after a judge ordered the alleged shooter, Jarrod Ramos, to remain detained and held without bond as he faces murder charges after the Thursday afternoon shootings that left five people dead and two injured.

Officials say Ramos, 38, of Laurel, fired a shotgun through the glass doors of the paper’s newsroom and then turned the weapon on his victims, carrying out what appears to be the deadliest attack on journalists in the United States in decades.

“To the families of the victims, there are no words to express our sorrow for your loss,” Trump said. “Horrible, horrible event. A horrible thing happened.”

“And your suffering — we pledge our eternal support,” the president continued. “My government will not rest until we have done everything in our power to reduce violent crime and to protect innocent life. We will not ever leave your side. So, our warmest, best wishes and regrets.”

Since taking office, Trump has repeatedly derisively referred to the media as “fake news” and said journalists are dishonest. He has on multiple occasions branded the media as “the enemy of the people.”

On Thursday, after news of the shooting in Annapolis broke, Trump tweeted that he had been briefed on the episode, adding: “My thoughts and prayers are with the victims and their families. Thank you to all of the First Responders who are currently on the scene.”

Later, White House press secretary Sarah Huckabee Sanders wrote on Twitter that a “violent attack on innocent journalists doing their job is an attack on every American. Our prayers are with the victims and their friends and families.”