Police in New York shot and killed an African American man in Brooklyn last night after mistaking a piece of pipe he was holding for a gun.

The shooting is the latest in a string of killings by police that have sparked a countrywide debate on violence by law enforcement.

It followed a similar incident that sparked protests in Sacramento, California, and came on the 50th anniversary of civil rights leader Martin Luther King Jr's assassination.

The shooting happened shortly before 5pm local time in Crown Heights, a predominantly black neighbourhood in the heart of Brooklyn.

Officers responded after receiving three 911 emergency calls saying a man was pointing an "object that appears to be a gun" at people on the street, said Terence Monahan, Chief of Department for the New York police. 

When police approached, the man "took a two-handed shooting stance and pointed an object at the approaching officers," Mr Monahan said.

Four officers fired ten shots at the man, who was pronounced dead in hospital.

Chief Monahan said the object the man was holding was not a gun, but rather "a pipe with some sort of knob on the end of it".

Shortly after the shooting, dozens of people gathered at the scene, with many denouncing the conduct of the police, according to footage broadcast live on Facebook.

According to media reports, the victim of the shooting was known in the neighbourhood and was mentally ill but not violent.

The shooting came less than three weeks after police in the city of Sacramento fired 20 rounds at 22-year-old Stephon Clark, fearing he was carrying a weapon.

Mr Clark, who was killed, was actually holding an iPhone.

Anger over the 18 March shooting erupted into days of protest in the streets of downtown Sacramento, with marchers blocking traffic and clashing with police.