On July 7, 2016, two gunmen opened fire on police officers during a Black Lives Matter protest in Dallas, fatally wounding five of them.

This tragic act of violence comes days after the shootings of two black men by police, Alton Sterling in Louisiana and Philando Castile in Minnesota.

Celebrities like John Legend, Demi Lovato, Rashida Jones and more immediately took to social media to address the brutal act.

The "All of Me" singer chose Twitter to describe the attack as "morally reprehensible" and "counterproductive." He went on to plead for peace.

Demi Lovato kept her reaction simple.

Rashida Jones tried to put the emphasis on love over hate.

Olivia Wilde lamented over the fact that a peaceful protest was tarnished.

"Scandal" creator Shonda Rhimes spoke about her connection to law enforcement.

NBA star LeBron James used the now-trending hashtag #stoptheviolence.

But, even before news broke of the Dallas situation, celebrities had been speaking up about the two young men shot by police earlier in the week.

Beyonce penned a long letter on her website with the heading "Freedom," after taking a moment of silence during her concert in Glasgow on July 7.

"This is a human fight," she wrote. "No matter your race, gender or sexual orientation. This is a fight for anyone who feels marginalized who is struggling for freedom and human rights."

Her husband Jay-Z chose to express himself through music, releasing a song about police brutality on July 8.

"I'm saddened and disappointed in THIS America," he wrote next to a link to his new track called "Spiritual." Adding, "We should be further along."

Halle Berry shared a photo of her son with a powerful message about the future on Instagram.

Drake also used Instagram to get his message across, signing off with, "Be safe out there. More life."

🙏🏼

A photo posted by champagnepapi (@champagnepapi) on

Alicia Keys shared a heartbroken photo of herself on Twitter, while her husband Swizz Beatz also released new music to have his voice heard -- a song called "Sad News."

It's time to stop the violence.