On Tuesday, the department awarded students at the University of Maryland first place in the competition for developing a project that helps friends and neighbors recognize signs of radicalization in young people. It is built around a video game and a social media campaign.

“Who better to push back against the prejudice, bigotry and hate online than students?” said Tony Sgro, the president of EdVenture Partners, the company that created the program.

Countering violent extremism online has become a focus of the United States government in recent years as groups like the Islamic State and Nigeria’s Boko Haram have successfully used the internet to market themselves and gain recruits. Dozens of young people from the United States have joined groups like the Islamic State.

But the government has long struggled to counter the groups’ use of social media.

So officials at Homeland Security and other federal agencies have turned to the very people whom terrorist groups are trying to attract: young people.

“The program addresses two fundamental things,” Mr. Selim said. “It brings real-world national security problems to the classroom, and it gives young people a chance to have their voices heard.”