Staff at a Maryland newspaper where a gunman shot five in their newsroom dead have hit out at Donald Trump.

A lone gunman opened fire on the offices of Capital Gazette newspaper in Annapolis last week - killing four reporters and one supporting staff member.

The paper’s staff released a letter on Sunday which thanked those who extended support in the wake of the mass shooting but also took a veiled swipe at Mr Trump.

“We won’t forget being called an enemy of the people. No, we won’t forget that. Because exposing evil, shining light on wrongs and fighting injustice is what we do,” they wrote.

Mr Trump, who has become famed for launching barbed attacks on the media whom he brands “fake news”, has persistently used the phrase “enemy of the people” to refer to the press.

However, the president did perform a U-turn on his usual condemnation of the press after the Maryland shooting – saying journalists should be able to work without fear of facing violent attack.

The comment raised eyebrows among many in the media given his regular attacks on the press.

Maryland shooting: Capital Gazette newspaper staff targeted Show all 10 1 /10 Maryland shooting: Capital Gazette newspaper staff targeted Maryland shooting: Capital Gazette newspaper staff targeted Police respond to the shooting in Annapolis, AFP/Getty Images Maryland shooting: Capital Gazette newspaper staff targeted Pat Furgurson, staff reporter of the Capital Gazette, reports outside the scene of a shooting EPA/JAY FLEMING Maryland shooting: Capital Gazette newspaper staff targeted Police and first responders attend the scebe EPA Maryland shooting: Capital Gazette newspaper staff targeted A member of the FBI responds to the shooting in Annapoli AFP/Getty Images Maryland shooting: Capital Gazette newspaper staff targeted Authorities work at the scene AP Maryland shooting: Capital Gazette newspaper staff targeted Emergency personnel outside the Capital-Gazette newspaper Getty Images Maryland shooting: Capital Gazette newspaper staff targeted Capital Gazette reporter Chase Cook, right, and photographer Joshua McKerrow, left, work on the next days newspaper while awaiting news from their colleagues. AFP/Getty Images Maryland shooting: Capital Gazette newspaper staff targeted Police respond to a shooting in Annapolis, Maryland, June 28, 2018. At least five people were killed Thursday when a gunman opened fire inside the offices of the Capital Gazette, a newspaper published in Annapolis, a historic city an hour east of Washington.A reporter for the daily, Phil Davis, tweeted that a "gunman shot through the glass door to the office and opened fire on multiple employees.""There is nothing more terrifying than hearing multiple people get shot while you're under your desk and then hear the gunman reload," Davis said. / AFP PHOTO / SAUL LOEBSAUL LOEB/AFP/Getty Images SAUL LOEB AFP/Getty Images Maryland shooting: Capital Gazette newspaper staff targeted "This was a targeted attack on the Capital Gazette," William Krampf, the Anne Arundel County acting police chief, said Thursday evening during a press conference, referring ot the joint name that appears at the office to describe the two papers that work inside. "This person was prepared today to come in. This person was prepared to shoot people. His intent was to cause harm, and as I've stated before, the investigative part of this is going to be thorough, and it's going to take some time," EPA Maryland shooting: Capital Gazette newspaper staff targeted Police secure the scene AP

”Journalists, like all Americans, should be free from the fear of being violently attacked while doing their jobs,” Mr Trump said at a White House event marking the six-month anniversary of his $1.5 trillion tax cuts.

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

CNN’s chief White House correspondent Jim Acosta shouted at Mr Trump from the back of the room during the event.

Mr Acosta – who has knocked heads with the Trump administration in the past – yelled: “Mr President, will you stop calling the press the enemy of the people?”

Mr Trump had earlier been filmed walking silently past reporters requesting comment or words of condolences at the White House.

Jarrod Ramos has been charged with five counts of murder in the wake of the shooting spree. The 38-year-old appeared in court on Friday morning where he was refused bail.

He reportedly had a long-standing grudge with the Capital Gazette and unsuccessfully tried to sue the newspaper for defamation in 2012 after it reported on a case in which he pleaded guilty to harassing a woman.