Indian Prime Minister Narendra Modi said on Tuesday that riots over access to river water in the technology hub of Bengaluru this week were "distressful" and the dispute must be resolved peacefully.

Protestors, angry about a court decision calling on the southern state of Karnataka to divert some of the water from the Cauvery river to neighboring Tamil Nadu, torched vehicles and pelted stones at people on Monday.

One person was killed in police firing as security forces took to the streets to quell the violence.

"Situation that has emerged in Karnataka & Tamil Nadu, as a fallout of issue of distribution of waters of Cauvery River, is distressful," Modi said on Twitter. "This dispute can only be solved within the legal ambit. Breaking the law is not a viable alternative."