President Obama added his voice Thursday to the national outrage over fatal police shootings of two African Americans this week, saying that "all Americans should be deeply troubled" by the incidents that are indicative of a "serious problem" of racial bias within the nation's criminal justice system.

In a message on his official Facebook page and a statement to reporters in Warsaw, Poland, where he arrived late Thursday for a two-day NATO Summit, Obama said that he could not comment on the specifics of the incidents involving the shooting deaths of Alton Sterling in Baton Rouge and Philando Castile in Falcon Heights, Minn., because of the ongoing investigations.

"What I can say is that all of us as Americans should be troubled by these shootings because these are not isolated incidents," Obama said in Warsaw. "They’re symptomatic of a broader set racial disparities that exist in our criminal justice system."

Obama responded after Sterling's death was captured on video by civil-rights advocates who responded to police scanner reports of a potential arrest and the aftermath of Castile's shooting was broadcast live on Facebook by his girlfriend.

In the wake of a series of high-profile, racially charged cases in recent years--including the shooting death of an unarmed teenager in Ferguson, Mo., in 2014--the Obama administration has sought to balance support for law enforcement agencies with additional scrutiny for the tactics employed by police officers in the field. The tensions in cities across the country gave rise to the Black Lives Matter political movement, and the issue of police use of force in impoverished communities has become an issue on the 2016 campaign trail.

Obama recited statistics from studies that he said illustrated the disparity that African Americans and Hispanics are arrested and incarcerated at higher rates than whites. He praised officers for the "vast majority of officers who put their lives on the line to protect us every single day.

"When people say black lives matter, it does not mean blue lives don't matter. All lives matter," Obama said in Warsaw. "But the big concern is that the data shows that black folks are more vulnerable to these kinds of incidents. This isn’t a matter of us comparing the value of lives, this is recognizing that there is a particular burden is being placed on a group of our fellow citizens and we should care about that. We can’t dismiss it."

Obama praised the Justice Department for opening a federal civil rights investigation into Sterling's death and he noted that Minnesota's governor has called for a federal investigation in that case. Sterling was shot by a white police officer while being restrained on the ground.

On his Facebook post, Obama said that "to admit we've got a serious problem in no way contradicts our respect and appreciation for the vast majority of police officers who put their lives on the line to protect us every single day. It is to say that, as a nation, we can and must do better to institute the best practices that reduce the appearance or reality of racial bias in law enforcement."