Updated

The death toll from Hindu-Muslim clashes in India's most populous state Uttar Pradesh has climbed to 31, police said Tuesday, but the violence has been brought under control.

The unrest, during which mobs burned houses and a mosque, erupted over the weekend in the village of Muzaffarnagar, 105 kilometres (65 miles) northeast of capital New Delhi.

"The death toll has risen to 31, but now everything is peaceful. Things are fully under control -- but we are on high alert," Lucknow police inspector R.R. Bharti told AFP by telephone.

The central government on Monday rushed 5,000 extra paramilitary personnel to the affected area of the state, which has a history of religion and caste-based violence in its 200-million population.

Uttar Pradesh witnessed riots in 1992 following the razing of a mosque by a Hindu mob. More than 2,000 people -- mostly Muslims -- were killed after the 16th-century structure in Ayodhya was demolished.

The latest violence has triggered speculation that parties are seeking to polarise the politically pivotal state along religious lines ahead of general elections due next year.

Security forces including the army were patrolling in riot-hit areas -- staging so-called "flag marches" intended to show their presence, Bharti said.

Villagers crowded police stations and mosques seeking safety as local media reported that mobs had ambushed people attempting to flee violence-torn areas on Monday.

"I have lost three of my relatives and 11 people from my village have died so far," Khairunissa, a Muslim woman who goes by one name, told the Press Trust of India.

Prime Minister Manmohan Singh expressed "grief and shock" over the violence on Monday and promised "all required assistance" to the state government for "tackling the situation".

The clashes erupted late Saturday after thousands of Hindu farmers held a meeting to demand justice over the killing of three Hindu men who had protested when a woman was allegedly harassed.

Inflammatory speeches calling for action against Muslims were allegedly made during the meeting and the farmers were attacked as they were returning home, triggering an angry backlash, a senior police officer said.

Clashes then broke out in neighbouring villages between Hindus and Muslims and the army stepped in to try to control the situation.