Image copyright Reuters Image caption The flag over the White House is lowered to half-mast on Tuesday

US President Donald Trump has ordered US flags to be flown at half-mast in tribute to five journalists killed last week at a Maryland newspaper.

He issued the proclamation on Tuesday morning, a day after Annapolis Mayor Gavin Buckley said the White House had declined his request to lower flags.

The White House says the president acted as soon as he learned of the Annapolis mayor's request.

Five Capital Gazette employees died in Thursday's shooting in Annapolis.

In his proclamation, Mr Trump ordered all flags at public buildings, military posts, naval vessels and embassies to be flown at half-mast until sunset on Tuesday.

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

His statement said: "Our nation shares the sorrow of those affected by the shooting at the Capital Gazette newspaper in Annapolis, Maryland.

"Americans across the country are united in calling upon God to be with the victims and to bring aid and comfort to their families and friends."

Grieving or grievance?

By Tara McKelvey, BBC White House reporter

Speaking to me and other reporters aboard Air Force One on Friday while flying to New Jersey, President Trump expressed condolences for the deaths of the Capital Gazette employees.

But during the flight he also criticised reporters, saying some are "bad", and told us: "The press has treated me very badly."

The suspect in the shootings had been involved in a legal dispute with the newspaper and had nothing to do with national issues.

Yet the relationship between the media and Mr Trump has been tense. He's singled out the media for verbal abuse at his rallies - while I've stood with my colleagues in roped-off areas and looked around at the crowd.

The relationship between Mr Trump and the media may continue to be difficult.

The White House said the president had been unaware of the mayor's request.

A spokeswoman at city hall in Annapolis had said earlier the mayor was "extremely disappointed" his suggestion was not initially approved.

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

She said the mayor "sees these murders as an attack on the freedom of the press as guaranteed by the First Amendment of the United States Constitution".

The Republican president has ordered flags to be lowered for mass shootings in the past, including after 17 were killed at Marjory Stoneman Douglas High School in Florida in February.

Mr Trump has previously called journalists the "enemy of the people", but following the Capital Gazette shooting, he said reporters should not fear being violently attacked.

The 38-year-old suspect in the attack has been charged with five counts of murder.

According to the Baltimore Sun, he posted threatening letters before his rampage at the Annapolis newspaper.

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

Anne Arundel County Police said three letters were sent - one to a lawyer, one to the Maryland Court of Special Appeals, and one to a Baltimore City judge.

The three letters were dated 28 June, the day of the shooting.

The suspect said in the correspondence he was on his way to the newsroom "with the objective of killing every person present", the Sun reports.

Prosecutors say the attack, carried out with smoke grenades and a pump-action shotgun, was motivated by a vendetta after the defendant unsuccessfully sued the newspaper in a defamation case.

Read more about US gun violence