Slain New York Police Department Officer Jason Rivera said in a 2020 letter obtained The New York Post that police "bothered" him growing up in an immigrant family, but he wanted to help bring positive change by becoming an officer himself.

Rivera, 22, was fatally shot Friday evening in Harlem while responding to a domestic dispute. His partner, Wilbert Mora, 27, was gravely wounded and hospitalized.

"When I applied to become a police officer, I knew this was the career for me," Rivera wrote in a "Why I Became a Police Officer" letter to the commissioner of the NYPD's training academy reviewed by the Post

(Jason Rivera (NYPD))

"Coming from an immigrant family, I will be the first to say that I am a member of the NYPD, the greatest police force in the world," the then-rookie officer wrote.

Rivera grew up in Inwood, a neighborhood on the northernmost part of Manhattan when "the community’s relationship between the police and community was not great" — about a decade into New York City's controversial stop-and-frisk program, he explained.

The now-deceased officer said his younger "perspective on police and the way they police really bothered me," but he went on to describe what he witnessed as an effort by police to change their policies and keep communities safe in a "chaotic city."

"Something as small as helping a tourist with directions, or helping a couple resolve an issue will put a smile on someone’s face," Rivera wrote, according to the Post.

Suspect Lashawn McNeil, 47, is accused of shooting both Rivera and Mora from an apartment bedroom in Harlem after the officers arrived at the location where they were responding to a domestic dispute call.

McNeil was shot by a third NYPD officer after the suspect opened fire, according to police. He remained in critical condition early Saturday, police said, after correcting an earlier police report claiming he had died at the scene. 

Lashawn J. McNeil

Lashawn J. McNeil

NYPD dispatch logs obtained by Fox News Digital show the call came in from a woman who was having a dispute with her son.

Police said the mother told them she had suffered no injuries and there were no weapons involved. The officers approached a back bedroom where McNeil’s mother directed them, then suddenly McNeil kicked open the door and fired on the officers, police said.

The officers were both rushed to Harlem Hospital where Rivera was soon pronounced dead. Mora remained in critical condition. 

NYPD described Rivera as "a hero officer — a son, husband, and friend."

Fox News' Brie Stimson and The Associated Press contributed to this report.