A Facebook rant and concerned 911 calls from a girlfriend are among the bits of information police in New York were piecing together Thursday as they tried to explain why an ex-con walked up to a police cruiser and fatally shot an officer and mother of three in the final moments of her shift.

Alexander Bonds, 34, was on parole for a robbery in Syracuse and otherwise had a checkered rap sheet. But he had been free for four years and had less than a year of parole left to serve.

Surveillance video from a nearby convenience store shows Bonds walking out the door and to the car shortly after midnight Wednesday. He fired one shot, hitting Officer Miosotis Familia, 48, in the head, and hurried off.

Her patrol partner, also in the car at the time, frantically called in the shooting. Bonds was fatally shot in a confrontation with police minutes later.

Thursday was supposed to be a day of celebration for the department as more than 500 candidates were sworn in to the city police academy. Instead, the department mourned the loss of a 12-year police force veteran.

"Thank you to our law enforcement partners, the community & all who continue to show their support for the NYPD. # NeverForget Officer Familia," the department tweeted Thursday.

Familia worked as a nurse before joining the force. As an officer, she spent her entire career in the Bronx precinct where she died, gaining admiration and respect on her beat along the way — even from the families of those she arrested.

Keisha Williams, 31, told the Associated Press that Familia arrested her husband on a marijuana charge last year.

“She gave me good advice, like a mother to a daughter,” Williams said. “She’s good, but she’s a tough cookie. She’s a good cop. I’m just sad it was her.”

Bonds had a history of run-ins with the law, but nothing of import since his release from prison in 2013. But last September he ranted against police in a disjointed, 11-minute Facebook Live video.

Related coverage:

NYPD officer dies after being 'assassinated' during July 4 celebrations

Bronx man arrested at JFK airport, accused of aiding Islamic State

“Y’all (expletive) so reluctant to want to say something to the police,” he says at the start of the video. “Man, police is (expletives) and this ain’t no gimmick."

He goes on to accuse police of murder and sex crimes against teens but provides no specific incidents.

“What do ya’ll who uphold the police say now? Like seriously, what do you say? You say good morning, officer? " he says. "Are you gonna’ rape my child today?”

He wraps up his video with a warning: “Mr. Officer . . . just keep your (expletive) away from mine.”

Three hours before the shooting, Bonds' girlfriend twice called 911, local media reported. The Daily News said the woman told the dispatcher her schizophrenic boyfriend was walking the Bronx streets and behaving strangely. But she added that she did not believe he was armed or dangerous.

Police failed to find him, and she called back a short time later but still police had no luck, the Daily News reported.

The tragedy was front and center in police Commissioner O'Neill's comments to the academy hopefuls Thursday.

"The work of Officer Miosotis Familia is not finished," O'Neill said, adding it is the job of NYPD officers, current and future, to finish it.