The mysterious package bomb that killed a Queens landlord over the summer was sent by a Brooklyn man targeting a cop who had arrested him three years earlier, federal authorities said Wednesday.

Victor Kingsley, 37, was trying to take out Officer Joel Crooms with the explosive device but he had the wrong address, sources said.

He was arrested Wednesday at his East Flatbush home, where officers discovered two more live bombs and materials to make other explosives, the sources said.

“Kingsley’s cowardly act was meant to target a New York City police officer for doing his job and resulted in the tragic death of an unintended victim,” NYPD Commissioner James O’Neill said.

Kinglsey — whose Facebook display name is “The God Called King” — may have learned to make the devices on social-media sites, authorities said. He bought some of the materials on Amazon and had them shipped to his house, according to a federal criminal complaint.

Kingsley was trying to get back at cops from the 67th Precinct who arrested him in January 2014 for having a Taser, the complaint states.

His first target was Crooms — and an Internet search revealed the address on 222nd Street in Springfield Gardens, sources said. But the cop never lived there, and after sitting on the porch for a week in July it was opened by landlord George Wray, 73. It detonated instantly, severely burning Wray. He died in the hospital a few days later.

The package had a return address that comes back to the 67th Precinct station house — with the name of Crooms’ sergeant, who had since retired and was out of the country at the time, according to the complaint.

Kingsley waged his alleged revenge campaign even though the Taser-possession charges against him had been dropped by a Brooklyn judge.

He allegedly searched for all of the cops addresses on Whitepages.com, called one of the officers and even reached out to a judge. It’s unclear if it was the same jurist who handled the Taser case.

The bombs found in Kingsley’s house included ball bearings, making them even more deadly than the one that killed Wray, sources said. “Bombs in the house, like that’s crazy,” said neighbor Louisiane Joseph. “He could have blown up the whole block.”

Crooms — who made $125,000 with overtime last year — is currently on modified duty. He was arrested in November for allegedly flashing his gun at a man during a drunken bar argument at an Outback Steakhouse.

Crooms declined to comment.