Former Pennsylvania Sen. Rick Santorum said Sunday that students who have rallied for gun control should instead learn CPR or find their own way to prevent a school shooting.

"How about kids instead of looking to someone else to solve their problem, do something about maybe taking CPR classes or trying to deal with situations that when there is a violent shooter that you can actually respond to that," the Republican said on CNN's "State of the Union."

The 2012 and 2016 presidential candidate said students could work to stop bullying in their communities or respond themselves to a shooter instead of asking lawmakers to approve legislation to protect them.

Santorum's comments prompted outrage on social media a day after hundreds of thousands of teenagers and their supporters rallied across the U.S. to push for tougher laws to fight gun violence.

Rep. Ted Lieu, D-Calif., posted on Twitter, “Dear Rick Santorum: CPR is good for heart stoppage. Not good for victims of multiple AR-15 bullets, which typically impart 3 times the lethal energy upon impact than a 9mm handgun bullet. AR-15 bullets obliterate organs and cause so much bleeding that victims die very quickly.”

The demonstrations Saturday were led by students from Marjory Stoneman Douglas High School in Parkland, Florida, where 17 people were killed last month.

“I think @RickSantorum might need to learn CPR for the NRA following midterms,” David Hogg, an #NeverAgain activist tweeted.

Santorum said that if the rallies are about more than politics, then the country needs to have a broader discussion that doesn't revolve around "phony gun laws" that don't work.

"They took action to ask someone to pass a law," he said of the demonstrators. "They didn't take action to say, `How do I, as an individual, deal with this problem?'"

The Associated Press contributed to this report