Metropolitan Police Chief Cathy Lanier at a June press conference. (Marvin Joseph/The Washington Post)

Police chiefs around the country began ordering patrol officers to ride in pairs Friday, rather than alone as many routinely do, as a safety precaution after officers were ambushed and killed in Dallas while protecting a protest march.

Officers in Washington, Boston, New York City, St. Louis, Philadelphia and Los Angeles County, among other places, were instructed to find partners, their departments said. Terry Cunningham, the president of the International Association of Chiefs of Police and chief of the Wellesley, Mass., police, said street officers “really are going to have to have vigilance. Any traffic stop, at any time, can be deadly. I don’t know what this means. I don’t know if this means more violence perpetrated toward law enforcement as a result of this.”

In Washington, Police Chief Cathy L. Lanier said she gave the order to partner up at about midnight, hours after the attack in Dallas killed five officers and wounded seven others. But, she said, “Looking at the type of attack that happened in Dallas, a two-man car, a four-man car, a 10-man car, isn’t going to make much of a difference. But it makes the officers feel much safer.”

Sgt. Matthew Mahl, president of the D.C. police union, called the orders prudent after what he called “a pretty sad day in law enforcement.” He said officers in Dallas were “protecting a peaceful protest when a group of people decided to take action into their own hands and slaughter five officers.”

Police commanders nationwide began pondering Friday not only the significance of the tragedy, but whether they need to reconsider how they do their jobs in a more highly charged environment when viral video and angry rhetoric can quickly ignite anti-police sentiment.

At least five Dallas police officers were killed and seven wounded July 7, after a peaceful protest over recent police shootings. Here's what we know so far. (Deirdra O'Regan/The Washington Post)

Cunningham of the IACP said, “This one is very, very difficult, trying to put this into perspective. What does it mean for the country, for Dallas?. . . These last 18 to 24 months have been really dark times for law enforcement. Today’s a day for us to grieve for the officers in Dallas. Tomorrow’s the time to start thinking about solutions and ways to heal and ways to move forward.”

Tom Manger, head of the Major Cities Chiefs Association and chief of the Montgomery County, Md., police, said, “Since Ferguson, it seems like the media, in general, it feels like we’ve been under siege. If a bad shooting happens, there is sweeping condemnation by pundits of all police. I think that cops are demoralized. I know there’s people who don’t like the police. But the vast majority of people do appreciate what we do. I try to remind my cops, people do appreciate what you do. Few people have the heart and courage to do the job you do.

Over the past year, District police have boosted security in and around station houses. Lanier said that she increased the threat level on Friday, ordering additional security around police parking lots and other buildings.

Lanier said there were already extra police on the street Thursday night to monitor protests following fatal shootings by police in Minnesota and Louisiana, which sparked anger about what some say were unjustified shootings of black men by white officers. She described demonstrations in the city as impassioned but peaceful.

“I could see emotions are high,” Lanier said.

Manger said not all police departments have the manpower to double up in patrol cars, “but it certainly enhances officer safety if there’s an ambush situation.” He said his department was already reviewing tactics and training, “Those conversations started the first thing in the morning.”

Manger added, “I think police officers feel like there’s always somebody out there trying to get me in trouble, trying to catch me doing something, baiting me so they can be the next YouTube sensation. Every time they make an arrest, there’s three or four cellphones going. You can’t make an arrest, especially out in public, without people whipping out their cellphones.

Jim Pasco, executive director of the national Fraternal Order of Police union, said, “It’s part of a downward spiral in police community relations.” He said officers across the country woke up Friday morning, were horrified by the news, “then they get dressed and put on the badge and uniform and they’re going to go out and do their jobs anonymously and often heroically, until somebody screws up and the entire police complement is going to get caught up in a gigantic generalization about how cops are incompetent.”

At a graduation ceremony for Los Angeles Police Department recruits on Friday, L.A. police Chief Charlie Beck said, “We have done what societies do when they’re in trouble. We have separated. We have broken into tribes. We must move beyond that. This is not about black lives. This is not about brown lives. This is not about blue lives. This is about America. We are too violent as a society. It is time to put down our arms and start a dialogue.”