The New York Police Department officer fatally shot in Harlem on Friday evening has been identified as 22-year-old Jason Rivera.
CNN  — 

The 22-year-old NYPD officer who was killed in the line of duty during a police response to a domestic call at a home in Harlem Friday night said his first-hand experience with the controversial policy of stop and frisk and the department’s effort to bolster community relations ultimately propelled him to join the department.

“I remember one day when I witnessed my brother being stopped and frisked,” Jason Rivera wrote in an undated letter to his commanding officer, penned while he was in the police academy. “I asked myself, why are we being pulled over if we are in a taxi,” Rivera wrote.

Rivera, who entered the police academy on November 2, 2020, according to a source with the knowledge of the officer’s records, said his community of Inwood was at odds with the NYPD but soon saw the department make efforts to change its ways, according to the letter obtained by CNN.

“As time went on, I saw the NYPD pushing hard on changing the relationship between the police and the community,” Rivera wrote. “This is when I realized I wanted to be part of the men in blue; better the relationship between the community and the police.”

The controversial policy of stop and frisk was ended in 2014 after critics argued the practice disproportionately targeted people of color.

Rivera wrote he was so moved by the NYPD’s effort to change, he wanted to be the first person in his family to become a police officer in what he called “the greatest police force in the world.”

“When I applied to become a police officer, I knew this was the career for me,” Rivera said.

Mayor Eric Adams honored Rivera and the other officers involved at a vigil held in Rivera’s honor on Saturday night.

“There’s a subtext to this story that I don’t want to be missed,” Adams said. “The three officers that were involved, two of them were born outside this country, one in India and one in the Dominican Republic, the third is a first generation.”

“And so when you start talking about the contribution of the immigrant community to this city, you better understand the reality that they are putting their lives on the line for the city and country that they love,” Adams said.

Adams, a former police captain, added that he “unapologetically” has the backs of NYPD officers.

“We’re not going to be intimidated by those who believe we should look down on the men and women who put on that bulletproof vest, stand on street corners, protecting children and families,” Adams said at the vigil. “I wasn’t ashamed to wear that uniform, and they’re not going to be ashamed to wear that uniform.”

When Adams took office January 1, he emphasized he would not let New York become “a city of disorder” as it faces an uptick in violence and crime.

Speaking Saturday, Adams reinforced the point that he’s dedicated to unite everyone around the issue of gun violence.

“We can have philosophical disagreements about things, but you can’t have a disagreement about a gun,” Adams said. “An illegal gun is a line in the sand and we need to send a clear and loud message. … You can’t carry guns and use guns in our city.”

CNN’s Artemis Moshtaghian, Aya Elamroussi and Kiely Westhoff contributed to this report.