Jada Pinkett Smith has reacted to the Dallas massacre of five police officers saying that retaliation from "desperate communities" was inevitable following the recent deaths of Alton Sterling and Philando Castile at the hands of police .

The Texas city descended into chaos in the early hours of Friday (8 July) after snipers shot 12 officers "from an elevated position" during a protest over recent deaths of Sterling and Castile. Three people are in custody following the shooting at El Centro college with the fourth now dead following a stand-off which saw them "exchanging gunfire with authorities". Two of the slain officers have been named as Patrick Zamarripa and Brent Thompson.

Speaking to TMZ at LAX, Smith said that the atrocity, which is the deadliest single attack on US law enforcement officers since 9/11 in 2001, was further proof that America needed to take action.

When asked how to stop the violence, the 44-year-old star said: "That's a good question. Here's what I know: you gotta do something because at the end of the day, it can't keep happening. Desperate communities do desperate things. At some point we're gonna have to do something."

After the camera man suggested a CNN special on the subject, she replied: "We are going to have to figure it out for sure. Trust me it's on my mind."

As expected her comments have divided the online community, with some claiming that she was condoning the alleged acts of revenge. "Things MUST change with the police - no question. BUT to go on a shooting spree in retaliation is wrong on every level," one commentator said. "It sickens me the BLM supporters posted comments like they did celebrating the killings. Should someone start taking out BLM folks for their actions (in retaliation) all h/E/ll will break loos."

Jada Pinkett Smith
Jada Pinkett Smith believes that the Dallas shooting was destined to happen. Getty

Earlier this year, the Gotham actress was at the forefront of the #Oscarssowhite race row after vowing to boycott the annual ceremony. In a video she posted online she admitted that she was furious that her partner, who has been nominated twice before, for 2001's Ali and 2006's The Pursuit of Happyness, was overlooked and said it was time for "people of colour" to disregard the awards.

"Begging for acknowledgement, or even asking, diminishes dignity and diminishes power, and we are a dignified people and we are powerful. Let's let the academy do them, with all grace and love. And let's do us differently."