When an Egyptian immigrant in Harrisburg, PA decided to conduct what the Department of Homeland Security referred to as a terrorist attack, he probably had a good chance of creating all kinds of havoc.

After all, we’ve seen enough mass shootings lately to understand that such attacks can be devastating.

For suspected terrorist Ahmed Aminamin El-Mofty, however, his plan didn’t go as he intended. That might have been his target selection.

As officials search for more clues about the motive for an Egyptian immigrant’s shooting rampage that targeted law enforcement in Pennsylvania’s capital city, the U.S. Department of Homeland Security is calling it a “terror attack.”

Pennsylvania State Police, Harrisburg police and other Pennsylvania authorities have yet to classify Ahmed Aminamin El-Mofty’s Friday afternoon shooting rampage as terror.

The 51-year-old shot at local and state police during the shooting spree that spread two miles across Harrisburg. Law enforcement officers shot and killed El-Mofty. Dauphin County District Attorney Ed Marsico said he has “no doubt” the gunman targeted law enforcement.

Tyler Q. Houlton, the acting press secretary for DHS, posted a statement on Twitter late Saturday confirming El-Mofty emigrated from his native Egypt on a “family-based immigrant visa” and became a naturalized citizen before going on the shooting spree that Houlton called a “terror attack.”

The gunfire began shortly after 4 p.m. Friday, when the man fired several shots at a state Capitol officer in downtown Harrisburg, striking his car several times and sending one shot “that went very close to hitting him,” Marsico said. About 20 or 30 minutes later, he fired several shots at a state trooper, striking her once.

The trooper is “doing well,” is in good condition and is expected to make a full recovery, Marsico said.

Of course, that’s good news. I hope the trooper makes a speedy and full recovery, obviously.

However, let’s look at El-Mofty’s chosen target demographic. He went after people who he had to know would be armed and trained to use lethal force to defend themselves or other people.

As a result, his attack was about as effective as using a Lena Dunham photo to treat erectile dysfunction.

Now, let’s think about something I wrote following the botched New York subway attack when I suggested armed citizens as being a key part of dealing with domestic terrorism. I suggested then that a nation of armed citizens, milling about in their day-to-day life, could be an effective bulwark against terrorism because they could meet terrorist aggression with naked, American force.

I’m sorry, but if the events in Pennsylvania do nothing else, they solidify that belief.

While El-Mofty may have been a complete idiot because he chose to go after the police, the point remains that he went after people who were armed and could fight back. The result was fewer casualties and a dead bad guy. I’m sorry, but that’s a big win.

Yes, an officer was injured, and that’s unfortunate. However, we’re not dealing with police funerals in Pennsylvania today, and it’s proof that terrorism fails when it’s met with armed resistance.

Just like every other kind of murdering scumbag out there.