India's top court has ordered the southern state of Karnataka to release water from a disputed river to neighboring Tamil Nadu after violence erupted in both states over water sharing.

The Supreme Court on Monday ordered Karnataka to release 12,000 cusecs (cubic feet per second) every day to Tamil Nadu. Farmers in both states have complained of severe water shortages.

The Cauvery River, which originates in Karnataka and flows into Tamil Nadu, has been the source of a bitter water dispute for decades. Karnataka told the court it did not have enough water reserves to share.

Earlier Monday, protesters in Tamil Nadu vandalized a hotel owned by people from Karnataka, triggering violent protests in both states.