The gunning down of five cops in Dallas was terrorism, pure and simple. The lunatic who did it framed his rampage as retaliation for police shootings of African-Americans. But these were not two sides of the same coin. They were different coins altogether.

The early evidence suggests that the fatal confrontations in Baton Rouge and St. Paul resulted from bad policing with a possible racial component. But each case involved an interaction between a specific officer and an identified civilian. In piecing together exactly what happened, the actions of the deceased are as important as those of the police.

The Dallas gunman was going after cops, any cops. Before a police robot bomb “neutralized” him, Micah Johnson told negotiators that he wanted to kill white cops. How he could detect the skin color of officers shot from a distance in the dark — some mixed in with the Black Lives Matter demonstration — is unclear. The color he definitely saw was the blue of their uniforms.

Johnson bragged of plans to detonate explosive devices in the city and beyond — all designed to intimidate a larger population. This is the definition of terrorism. It belongs with the mass murder of innocents at a black church in Charleston, South Carolina, and the bloody attacks on nightclubs in Paris and Orlando.

That the perpetrator was, to use the politically correct term, “troubled” does not make his crime something other than terrorism. Johnson left the Army Reserve, reportedly after stealing women’s panties. On seeing his record, several black power groups shunned Johnson’s efforts to join them. Police said he was singing and laughing as they tried to negotiate with him.

Red flags that something’s not right in the head wave in almost every terrorist’s bio. Dylann Roof, the 22-year-old white supremacist charged with the mass shooting in the church, had sunk into drugs and alcohol.

In 2014, a “troubled” black man, citing the Eric Garner and Michael Brown police shooting cases, traveled from Baltimore to Brooklyn, where he assassinated two officers sitting in their patrol car. He shot his ex-girlfriend on his way. Race shouldn’t matter here, but for the record, one of the murdered officers was Asian, the other Latino.

Of course, Johnson claimed to be serving a cause greater than himself — in his case, Black Lives Matter. Terrorists almost always do.

Much of the scorn subsequently heaped on Black Lives Matter is unfair. In social media, there are no controls on who may attach their repugnant views to a hashtag. And frankly, there’s hardly a bizarre thought that can’t find validation somewhere online.

Randomly shooting at officers could be one definition of mental illness, but aiming at the Dallas police hit a new low in rationality. Under Chief David Brown, Dallas has become one of the most progressive big-city police departments in the country. It has gone far in repairing relations with locals feeling harassed and endangered by rogue cops. Complaints of police violence have plummeted.

Left to his own unstable devices, Johnson probably didn’t register that he was shooting at a peaceful Black Lives Matter demonstration. Nor did he seem to notice the officers’ role in encouraging and protecting the demonstrators.

This discussion is in no way intended to downplay the accusations of police brutality against minorities. Every charge deserves a thorough investigation.

There are, in the words of New York Police Commissioner William Bratton, “cops who shouldn’t be here.” But there are over 800,000 police officers in this country, all of them human, most trying to do their hard job. It was a terrorist who judged total strangers by the color of their uniforms.

Bonneau seems to be a Zuckerberg-Barra microcosm: all 8-year-old lemonade stand owners must deal with permits, licenses and taxes -- no matter how casual the operation -- because a successful market leader says so.

The thing I don't understand, with all the finger-pointing that's gone on since the announcement Thursday that Amazon.com Inc. was abandoning its plans to set up shop in New York City, is why so many of the fingers have been pointed at the least culpable party - i.e. Amazon itself.