A Florida man who shot a police officer in the face before killing four children — and then himself — had a lengthy criminal record on domestic violence and other charges.

Gary Lindsey critically wounded the Orlando police officer during a domestic violence call late Sunday night and then took his and his girlfriend’s children hostage, reported the Orlando Sentinel.

ADVERTISEMENT

The 35-year-old killed all four children — Iraya, 12; Lillia, 10; Aidan, 6; and Dove, 1 — before taking his own life during the standoff. He was the father of the two younger children.

Court records show Lindsey has been arrested numerous times on a variety of charges, including a shoplifting arrest last month at Walmart, but managed to avoid a lengthy prison term and somehow acquired a gun used in the mass shooting.

It’s not clear how Lindsey obtained the weapon used to kill the children and himself.

Lindsey was charged in 2008 with arson, domestic battery, fleeing and attempt to elude in Volusia County after deputies say he burned down a Deltona home, but the domestic battery charge was later dropped.

The victim told police that Lindsey began stabbing a television set during an argument about a week before Christmas, and he ordered the woman out of the home before setting the building on fire using gasoline.

ADVERTISEMENT

Lindsey was convicted the following year and sentenced to 30 years of supervision, and a judge ordered him in 2010 to live with his mother in Deltona as a condition of his probation.

He was arrested four times on probation violations after that and allowed to move to Orange County to be closer to his infant son, and the court required him to undergo a medical evaluation for mental illness.

The baby’s mother called police in April 2012 to report that Lindsey became violent and threatened her at knifepoint as she held their 7-month-old son — who was later killed during the standoff — during an argument over taking the boy to a doctor.

ADVERTISEMENT

Lindsey was arrested on felony charges in that case, which also triggered probation violation, but prosecutors decided not to file charges the following month after he explained that he was diabetic and had not taken his medicine.

He was sentenced to 324 days in jail for the Volusia County probation violation and given credit for 214 days served.

ADVERTISEMENT

But he violated probation again in August 2013 for failing to pay restitution, and he was released from jail after entering a plea.

Lindsey was arrested May 4 at a Walmart in Sanford, where store employees spotted him leaving with a shopping cart full of unpaid items — but he was released back to his probation after pleading to the violation.