Image copyright AP Image caption Prosecutor John Choi said "unreasonable fear" could not justify the use of deadly force

A US police officer who fatally shot a black man in Minnesota in July has been charged with second-degree manslaughter, prosecutors say.

Officer Jeronimo Yanez opened fire on Philando Castile, 32, after stopping his car in Falcon Heights, St Paul.

The aftermath was streamed live on Facebook by Mr Castile's girlfriend who was a passenger in the car.

The death prompted widespread protests in St Paul.

The killing is one of a series of deaths of black men and boys at the hands of police - which has fuelled claims of institutionalised racism in US society.

Image copyright AP Image caption Protesters placed an image of Philando Castile on the gates of the governor's residence in St Paul

Image copyright AP Image caption Lawyers for officer Jeronimo Yanez say he reacted to the presence of a gun in Mr Castile's car

Announcing the charge on Wednesday, district prosecutor John Choi said that evidence, including video from a police car, showed that when the officer had approached the car, Mr Castile had calmly told him he was carrying a gun.

Mr Choi said the officer had told Mr Castile not to pull the gun out and Mr Castile and his girlfriend had both said that he was not doing so. He said the officer had then screamed, drawn his gun and fired seven shots.

He said that as Mr Castile was dying, he had uttered his final words: "I wasn't reaching for it."

Mr Choi said that "unreasonable fear" on the part of a police officer could not justify the use of deadly force.

Mr Castile's mother, Valerie Castile, said the charge was the strongest the family could have hoped for under Minnesota law.

Glenda Hatchett, a lawyer representing the family, described the move as "an important signal to this nation".

Media playback is unsupported on your device Media caption "You shot four bullets into him, sir" - Philando Castile's girlfriend, Lavish Reynolds, live-streamed the aftermath of the shooting

Speaking after the shooting, Mr Castile's girlfriend said he had been shot while reaching for his ID after telling the police officer he had a gun and a permit for it.

Lawyers for Mr Yanez, who is Latino, have said that he reacted to the presence of a gun in the car. They say he stopped Mr Castile because he appeared to be a possible match for an armed robbery suspect.

But the district prosecutor said on Wednesday that Mr Castile had not been a suspect in that robbery.

Mr Castile's family say he was racially profiled.

Mr Yanez is due to make his first court appearance on Friday. If found guilty, he faces a maximum prison sentence of 10 years.

Mr Castile's death led to angry protests outside the governor's mansion and another demonstration that shut down a main highway in St Paul for hours.