A 36-year-old Somerville man has been found guilty of aggravated arson for setting fire to a Hillsborough home in which nine people were sleeping — four of them children.

Patrick Hammond did manage to avoid conviction of first-degree attempted murder in the trial before Somerset County Superior Court Judge Michael Rogers.

The judge convicted Hammond of second-degree aggravated arson, nine counts of third-degree endangering another person, four counts of third-degree endangering the welfare of a child and criminal mischief, a disorderly persons offense.

He also was convicted of two counts of third-degree animal cruelty, as two cats died in the house fire two years ago.

Hammond had started it after an argument with his on-again/off-again girlfriend, who lived there with her two young children, prosecutors said.

He had ignited a flammable liquid in the early morning hours of December 30, 218, before taking photos of the fire with his cell phone and sending them to friends.

Hammond then ditched the phone, a lighter and a burnt glove in some woods as he tried to walk to a pre-arranged ride, but was caught by police.

His sneakers later tested positive for a flammable liquid.

One of the people inside the home had seen the flames and everyone except the cats managed to escape.

When sentenced on June 9, Hammond faces five to ten years in prison for the arson count alone, while each endangerment charge could mean three to five years.

Hammond has been in custody at Somerset County Jail since his arrest, prosecutors said.

NJ towns that actually cut property taxes in 2020

New Jersey property taxes went up by $158 for the average homeowner last year, making the average residential property tax bill $9,111. Here are the municipalities that saw their average tax bill decrease.

LOOK: The Most Famous Actor Born Every Year