Snipers operating from rooftops in Dallas have killed five police officers and wounded six in a coordinated attack during one of several protests across the country against the killing of two black men by police this week.

Police described Thursday night’s ambush as carefully planned and executed and had taken three people into custody before a fourth died from what Dallas-based media said was a self-inflicted gunshot after a standoff that extended into Friday morning.

The fourth suspect had exchanged gunfire with police during the standoff at a downtown garage and warned of placing bombs throughout the city. Police are yet to confirm his death.

The attack, which took place as a protest in Dallas was winding up under the watch of officers and was one of the worst mass shootings of police in U.S. history.

White House officials have spoken with Dallas Mayor Mike Rawlings about the shooting that turned the downtown of one of the largest U.S. cities into a sprawling crime scene.

President Barack Obama, while in Poland, said he had spoken to Rawlings and expressed his “deepest condolences” on behalf of the American people.

“I believe I speak for every single American when I say that we are horrified over these events and we are united with the people and police department in Dallas,” he said.

Obama also said the FBI was in contact with the Dallas Police Department and that the federal government would provide any assistance to Dallas as it deals with the incident.

We still don’t know all of the facts. What we do know is that there has been a vicious, calculated and despicable attack on law enforcement,” he said.

No specific motive has been given for the shootings at the downtown protest, one of many held in major cities across the United States on Thursday.

New York police made more than a dozen arrests on Thursday night, while protesters briefly shut down one of Chicago’s main arteries.