The massacre that left at least 22 people dead in Canada may have started as a domestic violence dispute — and cops are probing if the gunman had an accomplice, according to reports.

Gunman Gabriel Wortman, 51 — who went on a 12-hour rampage while dressed as a cop in Nova Scotia over the weekend — allegedly first burned down his own house before targeting his ex-girlfriend and her new boyfriend at her home, investigators told ABC News.

He then left a bloody trail of bodies near his former partner’s home and set fire to at least four more properties in the Portapique area, according to the Royal Canadian Mounted Police.

Authorities have not yet determined a motive but believe that the shooting spree may have started as a fight between the former couple, investigators told the station.

Cops are also probing whether the madman had an accomplice as they comb through a total of 16 crime scenes, according to the Wall Street Journal.

“The investigative team is focused on learning more about this very tragic situation, including accurate victim information and whether others may have aided the suspect,” the Royal Canadian Mounted Police told the paper.

Authorities have said Wortman — a police-obsessed denture maker who struggled with alcoholism — began his murderous spree with “an initial motivation” and the bloodbath devolved into “randomness.”

Victims of the slaughter include a 54-year-old cancer survivor, a 17-year-old girl and a female Royal Canadian Mounted Police officer killed in the line of duty.

Wortman was shot dead by cops who surrounded him at a local gas station at on Sunday.