Democratic presidential candidate Beto O'Rourke is seen at the site of a mass shooting at a Walmart in El Paso, Texas, August 4, 2019.

Following the mass shooting in his hometown of El Paso, Texas, last week, Democratic presidential candidate Beto O'Rourke is seeking to hold social media companies accountable for the hateful content their users post.

As part of a plan released on his campaign website Friday called "Combating Hate and Violence in America," O'Rourke is going after a key piece of legislation known as Section 230 of the Communications Decency Act. The law provides social media companies immunity from legal liability for their users' posts and has been hotly debated by lawmakers as privacy scandals and antitrust probes have descended upon Big Tech.

O'Rourke says the legislation should be amended to allow tech companies to be held accountable "where they are found to knowingly promote content that incites violence."

O'Rourke's plan draws a clear line between hateful messages on the internet and real-life violence. In the case of the El Paso shooting, the link was clear — the gunman reportedly released an anti-immigrant manifesto on the message board 8chan just prior to the attack. Following the revelation, cybersecurity company Cloudflare cut its service from 8chan, and O'Rourke's plan calls for other providers to do the same.

"We must connect the dots between internet communities providing a platform for online radicalization and white supremacy, as propaganda outlets like Fox News fuel that fire, and the fact that hate crimes against Black and LGBTQ+ Americans are on the rise," according to the post on O'Rourke's campaign website.

O'Rourke's proposal could have serious implications for social media platforms such as Facebook, Twitter and Google-owned YouTube, which all came under fire after videos of the shooting in Christchurch, New Zealand, proliferated on their platforms earlier this year.

The plan would require "large internet platforms to adopt terms of service to ban hateful activities, defined as those that incite or engage in violence, intimidation, harassment, threats, or defamation targeting an individual or group based on their actual or perceived race, color, religion, national origin, ethnicity, immigration status, gender, gender identity, sexual orientation or disability."

The plan doesn't just apply to Big Tech companies. Companies of all sizes would be liable if they host content that promotes violence.

If enacted, these platforms would likely have to amend their policies and removal processes or face a greater threat of legal repercussions.

In his latest stance, O'Rourke joins his former opponent Sen. Ted Cruz, R-Texas, to whom he narrowly lost a bid for the state's Senate seat last year. Cruz's motivations for opposing the legal protection for tech companies are far different, however. During a debate leading up to the 2018 election, Cruz said he believes Big Tech does not deserve immunity if the companies cannot eliminate bias from their platforms.

Subscribe to CNBC on YouTube.

Watch: Back-to-back mass shootings in Texas and Ohio leave 31 people dead