Mangalore Muslim student beaten
Muslim student Mohammed Riyaz (far left) was allegedly beaten for posing with female Hindu classmates in this photo. Twitter

A Muslim student was brutally beaten by a vigilante group for posing for a photo with a group of girls believed to be Hindu, police in southern India have said.

Mohammed Riyaz, 20, was attacked after an image of him posing with two other boys and five of their female classmates at a college in Surathkal, near the southwestern city Mangalore, was circulated online.

According to news site The News Minute, Riyaz is seen sitting on the far left of the group in the photo while one of his friends, Mohammed Swali, lies on the girls' laps.

The snap was reportedly posted on Facebook with the caption: "Hindu Girls Muslim Boy" and soon went viral through messaging app WhatsApp.

This display of affection between students of a different sex and religion outraged a local Hindu gang, which decided to punish the young men for what they perceived as an immoral behaviour.

"After the photograph was circulated on social media sites, a vigilante group got other students from the college to identify the deviant youth and on learning that he was probably a Muslim, decided to attack him," police assistant commissioner Ravi Kumar told The Indian Express.

As they failed to locate Swali, the right-wing vigilantes turned on Riyaz. The group of up to 10 men abducted him from his home, drove him to a secluded area and beat him with wooden sticks.

The student's parents filed a complaint with local police who have arrested two of his alleged attackers.

Riyaz, who is recovering in a local hospital from the injuries sustained in the beating is now also facing suspension from college.

Swali and the five girls in the photo have already been barred from class for defying a ban on using mobile phones on campus, according to The Indian Express.

Govinda Dasa College principal Professor K Rajamohan Rao told the newspaper they were waiting for Riyaz to leave hospital before making a decision on his case.

Public contact between men and women is taboo in conservative parts of India, where relations between different religious groups have been historically turbulent.