By Alex Dobuzinskis

LOS ANGELES (Reuters) - A 16-year-old boy killed in a weekend police shooting in Los Angeles that generated protests left a farewell note and confronted police with a replica handgun to end his own life, the city's police chief said on Thursday.

The Hispanic teenager, who died on Sunday in an encounter on a street in South Los Angeles, was initially described by police as an adult man.

He has since been identified as Daniel Perez, Los Angeles County Coroner's Office Lieutenant David Smith said in a phone interview. Perez died of multiple gunshot wounds, Smith said.

The shooting of Perez came the day after the police shooting in Los Angeles of an 18-year-old black man, Carnell Snell Jr., who police said was armed with a loaded handgun.

Both shootings generated protests in Los Angeles.

They followed a number of police shootings of black men that have touched off larger demonstrations and intensified a national debate over racial bias and excessive force in U.S. law enforcement.

Los Angeles Police Chief Charlie Beck said Perez called an emergency dispatcher on Sunday to report a man with a gun and gave a description that matched himself. He also left a farewell note for his family, Beck told a news conference.

Perez later confronted an officer who arrived at the scene, the police chief said.

"We believe that this officer-involved shooting was a result of his desire to end his own life," Beck told reporters.

"We are deeply saddened by these events and my heart goes out to his family as well as to the officer involved in the shooting," Beck added.

Beck said earlier in the week that Perez aimed the replica handgun at the officer, according to local media reports at the time.

The replica handgun was made to look more real, because its orange tip was painted black, Los Angeles police spokeswoman Norma Eisenman said earlier this week.

Federal law requires imitation firearms to have an orange tip to distinguish them from real guns. California lawmakers in 2014, following the shooting death by police of another teenager with an imitation firearm, passed a law to require even more visible markings for certain replica guns.

The officer who shot Perez to death had a body-worn camera and the footage confirmed the officer's version of the encounter, Beck said. But he said he would not release the video.

(Reporting by Alex Dobuzinskis; Editing by Peter Cooney)