The ex-convict who police say shot and killed an NYPD officer in the Bronx Wednesday ranted about police officers in a profanity-laced video on social media last year.

Investigators believe Alexander Bonds, who also went by the name John Bonds, had nothing more than an “I just hate cops” motive when he shot Officer Miosotis Familia, 48, in the face, a high-ranking NYPD official said. Bonds, 34, of the Bronx, fired at Familia through the window of an NYPD mobile command vehicle that was parked near Morris Avenue and East 183rd Street in Fordham Heights at about 12:30 a.m., officials said.

He was later killed by responding officers, and the stolen revolver was recovered from the scene, the NYPD said.

Bonds posted a Facebook Live video in September 2016, accusing an officer of raping a girl and going unpunished for the crime. He also complained about prison conditions and said officers beat and killed inmates.

“I don’t care about 100 police watching this,” he said in the video.

“I got broken ribs for a reason, son, we gonna shake,” he added. “We gonna do something. We can’t be dying for free, getting raped for free, just for them to give you hush money. Is you stupid? I don’t want the money. I want justice.”

Bonds’ girlfriend told detectives he seemed schizophrenic and paranoid of the police. Bonds was hospitalized in June for a breakdown after making a call to his sister saying he was going to kill someone, according to The New York Times. He was only out of the hospital for a week before the shooting, the Times reported.

Alvaro Kidd, 33, who lives near Bonds’ last known address in Foxhurst, said he saw him drinking at the corner Tuesday evening at 7:30 p.m.

Kidd said police are constantly on the block, where Bonds was known to stand outside with a group of men and young women, acting suspiciously.

“He looked suspicious like a person who can do anything, sell drugs or kill you,” Kidd said.

Moments before the shooting on Wednesday, Bonds was seen on surveillance video leaving a bodega, pulling up his hoodie and approaching the van. Wearing black gloves and a hoodie on a warm summer night, Bonds seemed “dressed to kill,” said one high-ranking police official later Wednesday.

Bonds was previously arrested for an armed robbery and criminal possession of drugs, New York Department of Corrections records show.

The armed robbery occurred in 2005 in Syracuse, Onondaga District Attorney William J. Fitzpatrick confirmed. Bonds was sentenced to 8 years in prison, and served in the Attica Correctional Facility, a maximum security prison in New York, Fitzpatrick said.

He had been on parole since 2013, officials said, but had several encounters with police for minor offenses, including public urination and alcohol use.

Bonds’ uncle Jamel Bailey, 44, was bewildered that his nephew is accused of killing an officer.

“If he did something that warrants judgment for this, call a spade a spade, but now it’s a surprise to me,” he said. 

Jenna Johnson, who arrived with Bailey and described herself as a friend of Bonds, said she didn’t know him to be a violent person. The Facebook video, she said, was just hyperbole, an outlet to vent.

“Everybody has their moments,” Johnson said. “You rant. That’s it.”

With John Asbury and Matthew Chayes