Eight people have been arrested in northern India for allegedly beating a Muslim farmer to death over claims the family was eating beef - a taboo among India's majority Hindu population.

District Magistrate Nagendra Pratap Singh said a mob of about 60 Hindus became incensed when a temple announced that the family had been slaughtering cows and storing the beef in his house in Bisara, a border village in Uttar Pradesh state.

Mr Singh saids the mob dragged 52-year-old Mohammad Akhlaq and his son from their home and beat them with sticks and bricks.

Mr Akhlaq was declared dead at a nearby hospital, while his son is being treated for serious injuries.

Since Prime Minister Narendra Modi, a Hindu nationalist, took office last year, hard-line Hindus have been demanding that India ban beef sales - a key industry for many within India's poor, minority Muslim community.

In many Indian states, the slaughtering of cows and selling of beef are either restricted or banned.

For Hindus, cows are worshipped as sacred, and many of the animals are often seen wandering unchecked around big city neighbourhoods and on highways during rush hour.

Tensions had been building in the village, where nearly 40% of the 1,500 residents are Muslim, after some Hindus complained that their cows and buffaloes were going missing, Mr Singh said.

When police arrested the suspects on Tuesday, a group of protesters attacked the officers and their vehicles, forcing police to open fire, according to local newspapers.

The eight suspects in custody were charged with murder and rioting, Mr Singh said. Police are searching for two more suspects in the area.

Meanwhile, police said they have sent samples of meat taken from Akhlaq's home to a laboratory to determine whether the meat is from a goat or a cow.

The Indian Express quoted Mr Akhlaq's daughter, Sajida, as saying that the family had mutton in the refrigerator, and not beef.

The attack occurred just days after the Muslim festival of Eid al-Adha, when Muslim families in India traditionally slaughter a goat, though in other countries cows and camels are also offered as sacrifices.

Uttar Pradesh has ordered an investigation into the incident, state official Alok Ranjan said.