Police in southern India have arrested seven people, including four students, and charged them with defaming the country's new prime minister in a college magazine, officials have said.

The arrests came after an annual student magazine at the Government Polytechnic College in Kerala state included a photograph of Narendra Modi in a collage of what it called "negative faces". Others featured in the collage were Adolf Hitler, Osama bin Laden and George W Bush.

District police chief N Vijaya Kumar said the seven were arrested on Wednesday and charged with defamation and criminal conspiracy and released on bail on Thursday. If found guilty, they could face prison terms and heavy fines.

The four students helped edit the magazine. The others who were arrested included the college's top official, the magazine's faculty adviser and the owner of the company that printed it.

Police seized a printing press and computers. The college said no further copies of the magazine would be distributed, according to Kumar.

"They were arrested under several charges, including defamation, intentional insult to provoke breach of peace, criminal conspiracy and printing matter known to be defamatory," he said.

Police made the arrests after Yuva Morcha, or Youth Front, a group affiliated with Modi's rightwing Bharatiya Janata party, complained about the collage.

The college's student union publishes the magazine each year based on a theme. This year's issue, which was distributed last week, explained world history through pictures of faces.

Modi, who was sworn in as prime minister late last month, was chief minister of the western Indian state of Gujarat when it was gripped by sectarian violence in 2002. More than 1,000 Muslims were killed. Modi's critics said he did little to stop the carnage, though he denies any wrongdoing.

A student wing of the Communist party of India (Marxist) runs the college's student union and has openly accused Modi of being responsible for the sectarian violence.

Indian politicians are known for being sensitive to public criticism or ridicule.

In November 2012, two 21-year-old college students were arrested in Mumbai for posting a comment on Facebook criticising the shutdown of India's financial hub for the funeral of a powerful rightwing politician.