A man fatally shot two New York City police officers while they were sitting in their car Saturday afternoon as a revenge attack for the deaths of Mike Brown and Eric Garner at the hands of police, according to The New York Times.

The shooter is allegedly from Baltimore and shot his girlfriend one day before killing the two NYPD officers in broad daylight, the Times reported. The two officers were Rafael Ramos and Wenjian Liu.

The suspect, Ismaaiyl Brinsley, 28, wrote on his Instagram account on the day of the shooting, "I'm putting wings on pigs today. They take 1 of ours, let's take 2 of theirs. This may be my final post," officials said. He used the hashtags #Shootthepolice #RIPErivGardner (sic) and #RIPMikeBrown.

The two police officers were sitting in their car in the Bedford-Stuyvesant section of Brooklyn, according to the Associated Press. Saturday's shooting marks the first police deaths in New York City since 2011.

"They were, quite simply, assassinated - targeted for their uniform," said Police Commissioner William Bratton, according to the AP.

NYPD Deputy Chief Kim Royster said it appeared the shots struck them in the upper body, the Times reported.

After shooting into the patrol car's passenger side, Brinsley ran into the Myrtle-Willoughby subway station across the street from Marcy projects, only a few blocks from where the shooting occurred in front of the Tompkins project housing, and then fatally shot himself in the head, Chief Royster told the Times.

Brinsley was born in New York and has been previously arrested for carrying a concealed weapon and stealing in Georgia, and in Ohio again for theft and robbery, according to the Times.

The weapon used in the shooting and suicide was found inside the subway station, the AP reported.

Since the deaths of Garner and Brown and the non-indictment for the officers that killed them, protests have occurred daily in New York, and police have come under intense pressure and scrutiny, according to the AP. The officers in both cases were white and the incidents put a spotlight on police treatment of minorities.

After fatally shooting his girlfriend on early Saturday in Baltimore, Brinsley began to post very serious threats to New York officers from her Instagram account, Commissioner Bratton confirmed, the AP reported.

Baltimore police took notice of the woman's Instagram account about a threat to New York officers and relayed the threat to New York City Police around the time the shooting occurred in Brooklyn, according to the AP.