Image copyright AP Image caption Peter Liang has pleaded not guilty to charges including manslaughter and official misconduct

A US police officer on trial for the fatal shooting of an unarmed man in a block of flats in New York City has pleaded not guilty.

Officer Peter Liang has been charged by a grand jury with offences including manslaughter and official misconduct.

Police said that the shooting in November of 28-year-old Akai Gurley, a black man, was an accident.

The failure of grand juries to indict officers over the deaths of other black men has caused nationwide protests.

Mr Gurley was shot in the chest after opening the door of a dark stairwell in a housing complex in Brooklyn.

Police say Mr Liang, who had been patrolling the flats, had fired without a word and apparently by accident.

Image copyright AP Image caption People protested outside the court on Wednesday

Image copyright AP Image caption Police have said that Mr Gurley was shot by accident in November

Assistant District Attorney Mark Fliedner said on Wednesday that Mr Liang was supposed to have kept his finger off the trigger and to the side of the weapon but had ignored his training.

Mr Fliedner alleged that immediately after the shooting on 20 November, Mr Liang and his partner had allegedly retreated to another floor instead of helping the injured man.

Defence lawyer Stephen Worth denied that Mr Liang had done nothing after the shooting and said that the assertion was a "tortured attempt" to make the defendant look heartless.