Image copyright EPA Image caption The victims, from top left: Rob Hiaasen, Rebecca Smith, Gerald Fischman; John McNamara (bottom centre), Wendi Winters (bottom right)

The suspect in the mass shooting at a Maryland newspaper office on Thursday barricaded an exit so that staff could not escape, says a prosecutor.

Officials earlier told reporters the accused, Jarrod Ramos, was not co-operating with the investigation.

Police found evidence at the suspect's house the attack on the Capital Gazette in Annapolis was planned.

Mr Ramos, 38, appeared in court via video link to be charged with five counts of first-degree murder.

Image copyright Anne Arundel Police/Handout via REUTERS Image caption The shooting suspect, Jarrod Ramos

A judge ordered him held without bail during Friday's hearing at Anne Arundel County criminal court.

Wearing blue detention clothes, the suspect reportedly said nothing, but watched the proceedings attentively.

Speaking at the White House on Friday, President Donald Trump expressed his condolences.

"This attack shocked the conscience of our nation and filled our hearts with grief," he said.

"Journalists, like all Americans, should be free from the fear of being violently attacked while doing their job."

Media playback is unsupported on your device Media caption Trump address "horrific" Annapolis shooting

Read more about US gun violence

Media playback is unsupported on your device Media caption After the Las Vegas attack in October 2017 the BBC looked at how US mass shootings are getting worse

How did the attack unfold?

The defendant is accused of entering the Capital Gazette office on Thursday afternoon and opening fire through a glass door.

He allegedly hunted for victims and sprayed the newsroom with gunfire as journalists hid under their desks and pleaded for help on social media.

Prosecutor Wes Adams said during Friday's news conference: "We brought to the judge's attention the evidence that suggested a co-ordinated attack.

Media playback is unsupported on your device Media caption Winters Geimer's mother, Wendi, was killed alongside four others

"The barricading of a back door, and the use of a tactical approach in the hunting down and shooting of the innocent victims."

Mr Adams said Mr Ramos had "entered through the front door and worked his way through the office".

He also said there was "one victim who attempted to escape through the backdoor and was shot at that point".

The victims were Wendi Winters, 65, editor and community reporter; Rebecca Smith, 34, sales assistant; Robert Hiaasen, 59, assistant editor and columnist; Gerald Fischman, 61, editorial writer; and John McNamara, 56, reporter and editor.

Two other people were hurt by broken glass, said police.

Image copyright AFP Image caption A woman who knew some of the dead stands before a makeshift memorial to victims of the Capital Gazette newspaper attack

Who is the suspect?

Investigators say he had a "long-standing grievance" with the newspaper.

He sued the Gazette for defamation over a 2011 column that reported on his guilty plea to criminal harassment of a former high school classmate on Facebook. He lost the lawsuit in 2013.

In the harassment case, he was reportedly spared jail time and ordered to get therapy.

Police said on Friday the defendant had made threatening comments online in May 2013 against the Gazette. But the newspaper declined to pursue charges, not wishing to "exacerbate" the situation, said investigators.

The woman who said she was stalked by him told Baltimore's WBAL she had warned a former police official years ago the suspect "will be your next mass shooter". She added: "He's a [expletive] nut job."

The accused became "fixated" with her for no apparent reason, she said, causing her to move three times, change her name and sleep with a gun.

Image copyright EPA Image caption The Capital Gazette staff worked through the tragedy, publishing a newspaper for circulation by the following morning

What's the latest in investigation?

On Friday, Anne Arundel County police chief Timothy Altomare said authorities had found evidence at Mr Ramos' residence "showing the origination of planning" for the attack.

He was asked by reporters how the suspect was able to buy a 12-gauge shotgun despite having been found guilty of harassment.

Mr Altomare said only those convicted of serious crimes and certain misdemeanours were banned from buying guns in Maryland.

Police said they used facial recognition technology from the Maryland Image Repository System to identify Mr Ramos.

Maryland is one of several US states that provides the FBI with access to its drivers' licences, police mug shots and other prison records.

How did the newspaper respond?

Despite falling victim to one of the deadliest attacks on journalists in US history, the Capital Gazette staff worked through the tragedy, publishing a newspaper for circulation by the following morning.

The newspaper's editors left the editorial page blank with a note saying they were speechless.

Photographs widely shared on social media showed Gazette reporters working on laptops in a parking garage to produce Friday's edition.

The newspaper was one of the first to publish the Declaration of Independence in July 1776, though the report appeared on page two because local news always leads its editions, according to the Baltimore Sun.