Dallas was left reeling a day after five police officers were gunned down by sniper fire, and reaction poured in from around the world.

U.S. President Barack Obama, while in Warsaw for the NATO summit, expressed sympathy for the victims and their families, and said there was "no possible justification" for the killings.

On social media, condemnation, sadness and frustration were among the myriad of emotions being expressed.

The shooting deaths of Dallas police officers come on the heels of two high-profile fatal shootings of black men earlier this week in the U.S. by police officers.

The family of Alton Sterling, fatally shot by police in Baton Rouge, La., earlier this week said: "Regardless of how angry or upset people may be, resorting to this kind of sickening violence should never happen and simply cannot be tolerated. Members of law enforcement have a very difficult job and the vast majority conduct themselves honorably as they protect and serve our communities."

Black Lives Matter, which in recent years has advocated for peaceful interactions between police and citizens, condemned the Dallas attacks, the same week the organization's Toronto chapter defended its protest at the city's Pride parade against police inclusion in the event.

The presumptive presidential nominees spoke to the tragic events in Dallas.

The U.S. attorney general, in addition to saying the government would help with the investigation, expressed her condolences.

Two prominent African-Americans who were part of the civil rights struggles of the 1960s denounced the attacks.

Former U.S. congressman Joe Walsh was not in a conciliatory mood, and said it was time to stand with the men and women in uniform.

Orlando's mayor, whose city was rocked by 49 deaths by a gunman at the Pulse nightclub on June 12, released an empathetic statement.

Condolences were expressed by international leaders, including the president of the European Council and Canadian Prime Minister Justin Trudeau.

American singer John Legend and TV producer-writer Shonda Rhimes were among the celebrities left stunned and saddened by the events.

A well-known baseball player who is a namesake of the man ID'd by Dallas police as a gunman in Thursday's attack sought to clear up any confusion and express his sorrow.