President Trump on Friday responded to the “horrific shooting” Thursday at the Capital Gazette newsroom in Annapolis, Maryland by saying journalists should not be targeted for attacks.

“Journalists, like all Americans, should be free from the fear of being violently attacked while doing their job,” Trump said during an event in the East Room marking the six-month anniversary of the passage of tax cuts.

Police say Jarrod W. Ramos, 38, blasted his way into the newsroom of the Capital Gazette with a pump-action shotgun, killing five people in one of the deadliest attacks on journalists in U.S. history.

On Friday, Trump, who often criticizes press coverage of his White House, struck a somber tone, calling it a “horrible, horrible event.” He said the attack “shocked the conscience of our nation and filled our hearts with grief.”

“My government will not rest until we have done everything in our power to reduce violent crime and to protect innocent life,” Trump said. “We will not ever leave your side.”

Ramos had a well-documented history of harassing the paper's journalists, a feud that apparently began over a column about Ramos pleading guilty to harassing a woman. He filed a defamation suit against the paper in 2012 that was thrown out as groundless, and he often railed against its staff members in profanity-laced tweets.

MARYLAND NEWSPAPER SUSPECT'S PAST SPARKED FEATS HE WOULD BECOME 'NEXT MASS SHOOTER'

Police said surveillance video recorded the attack, which began with a shotgun blast that shattered the glass entrance to the open newsroom.

Journalists crawled under desks and sought other hiding places, describing agonizing minutes of terror as they heard his footsteps and the repeated blasts of the weapon.

Officers swiftly responded and arrested him without firing a shot, police said. They recovered a gun and said he also carried smoke grenades. Some 300 local, state and federal officers converged on the scene.

A judge on Friday denied Ramos bail.

The Associated Press contributed to this report.