Two uniformed NYPD officers were shot dead Saturday afternoon as they sat in their marked police car on a Brooklyn street corner — in what investigators believe was a crazed gunman’s ­assassination-style mission to avenge Eric Garner and Michael Brown.

“No warning, no provocation — they were quite simply assassinated, targeted for their uniform,” Police Commissioner William Bratton said.

Officers Wenjian Liu and Rafael Ramos were working overtime as part of an anti-terrorism drill in Bedford-Stuyvesant just before 3 p.m. when they were shot point-blank in the head by lone gunman Ismaaiyl Brinsley, 28, who had addresses in Georgia, Maryland and Brooklyn.

Moments after killing the two officers, Brinsley, too, was dead, having turned his gun on himself on a nearby subway platform as cops closed in.

Liu, 32, a newlywed of only two months, had seven years on the force; Ramos, 40, dad to two sons, had two years on the job.

Brinsley was already a fugitive, suspected of putting a bullet in his ex-girlfriend’s abdomen at her residence in Baltimore at 5:45 a.m. Saturday, Bratton said.

By early Saturday afternoon — just three hours before shooting Liu and Ramos — vile anti-police threats were posted to Brinsley’s Instagram page. The threats referenced the ­recent police-involved killings of Garner and Brown.

“I’m Putting Wings on Pigs Today,” a person believed to be the gunman wrote. “They Take 1 Of Ours . . . Let’s Take 2 of Theirs,” the post continued, ending with, “This May Be My Final Post.”

The Instagram page included an image of a silver automatic handgun with a wooden handle.

That gun matches the Taurus semiautomatic that police recovered from Brinsley. Another ­image showed the same camouflage pants and distinctive blue sneakers worn by the gunman as his body was carried from the scene on a stretcher.

“I Rather Die a Gangster Then Go To Sleep A Coward,” read ­another post.

The sickening missives used the hashtag #ShootThePolice, along with two other hashtags referencing Garner and Brown.

Police in Baltimore had reached out via a “warning flier” to alert the NYPD that Brinsley might be en route to Brooklyn, but the fax tragically arrived at 2:45 p.m. — five minutes before the shooting, Bratton said. “The tragedy here was that just as the warning was coming in, the murder was occurring,” Bratton said.

The execution of the cops follows nearly three weeks of powder-keg tensions in the wake of a Staten Island grand jury’s decision not to indict a police officer for the chokehold that contributed to Garner’s death.

Four officers have suffered minor injuries in scuffles with protesters, including two lieutenants attacked on the Brooklyn Bridge a week ago Saturday.

Brinsley walked up to the cops’ patrol car at the corner of Myrtle and Tompkins avenues, approaching from the sidewalk.

“They were sitting in a marked NYPD car, in full uniform,” Bratton said of Liu and Ramos.

Brinsley “took a shooting stance on the passenger side and fired his weapon several times through the front passenger window, striking both officers in the head,” Bratton told reporters.

“Officer Liu and Officer Ramos never had the opportunity to draw weapons,” he said. “They may never actually have even seen their assailant — their murderer,” he said. Witnesses also said Brins­ley opened fire without ­uttering a word, a law enforcement source told The Post.

Brinsley stood stock still for a few moments, fleeing into the subway when he heard the siren of a second police car.

“The cops were struggling to get out of the vehicle,” eyewitness Courtney Felix, 23, of Bed-Stuy, told The Post. “They were hanging onto their wounds.

“One was clutching at his neck and the other was holding onto his collarbone. One cop stumbled out of the driver’s side and he leaned over to fall down,” the witness added. “He was trying to catch himself. He was mostly on the floor and he was fading out.”

Brinsley fled south on Tompkins to the subway, where “they engaged the guy and he ‘did’ himself,” an NYPD investigator said.

“While on the platform, Brinsley shot himself in the head — took his own life,” the commissioner said.

Brinsley had a criminal record dating back to at least 2006, when he was arrested in Georgia for carrying a concealed weapon, a knife, as well as shoplifting, according to online records.

The next year he was nabbed in DeKalb County, Ga., for criminal trespass, and by 2009, he was indicted in Ohio for robbery — a charge that apparently was later dismissed.

In 2011, he was arrested again in Georgia for reckless conduct, tampering with evidence, criminal property damage, and discharging his weapon. The outcome of the case is unknown.

The two officers were pronounced dead at Woodhull Medical Center, where colleagues and family members huddled tearfully.



Lieutenants Benevolent Association president Lou Turco said: “I don’t even know how to ­respond to this. Twenty-eight years on, and I don’t know what to say.”

Both shooting locations — above and below ground — were scenes of blood and terror.

“I heard shooting, four or five shots,” witness Derrick McKie, 49, told The Post of the cops’ tragic murder.

“He took a high-caliber weapon to the face. He was lifeless . . . All I could see was blood. His body was lifeless.”

Carmen Jimenez, 32, a social worker from Bed-Stuy, was on the subway platform when the gunman ran in, pursued by cops.

“It looked like two cops came in. There was lots of yelling and they said, ‘Everybody get down,’ ” said Jimenez, who is eight months pregnant.

“People were screaming. People were trying to run,” she said.

“I threw myself on the floor. I was afraid for my life and afraid for my baby.”

Additional reporting by Ben Feuerherd, Kevin Fasick, Erin ­Calabrese and Kathianne Boniello