The House has passed a bill requiring the Department of Homeland Security to use testimonials from former extremists and other social media messages to combat "Hollywood-style propaganda" used by the Islamic State and other militant groups to recruit new members.

Republican Rep. Chuck Fleischmann of Tennessee sponsored the bill. He said it would help prevent attacks such as a shooting at a Chattanooga reserve center last year that killed four Marines and a sailor. The FBI said the killer was inspired by foreign terrorists.

The bill was approved Tuesday, 322-79. It now goes to the Senate.

Some Democrats opposed the bill, saying it wrongly omitted hate groups and other domestic terrorists who have killed more Americans in recent years than foreign terrorists.