India's ruling party withdrew on Tuesday from an alliance government in the India-held Kashmir region in what analysts described as an attempt to appear tough on militancy before a general election.

The Bharatiya Janata Party (BJP) said it was pulling out of the governing coalition in Jammu and Kashmir state because of worsening “terrorism and violence”.

The Hindu nationalist party had ruled in the restive state since March 2015 when it struck an unlikely alliance with the Peoples Democratic Party (PDP), a local political outfit which has advocated more autonomy for Kashmir.

“It has become untenable for the BJP to continue in the alliance government in Jammu and Kashmir,” senior BJP leader Ram Madhav told reporters in New Delhi, referring to India's only Muslim-majority state.

“Today there is an increase in terrorism and violence, radicalisation is spreading fast.”

Madhav said the state government had failed to curb radicalisation or guarantee civilian rights in the volatile territory disputed with Pakistan.

The state's chief minister Mehbooba Mufti, who hails from the PDP, tendered her resignation after the alliance lost the majority to rule.

The state's governor, a figurehead who is appointed by New Delhi, will rule Jammu and Kashmir until fresh elections are held or a new coalition is cobbled together.

The move was seen as the BJP walking back its involvement in the troubled state, which has been racked by conflict for decades but which has witnessed an upsurge of violence under Prime Minister Narendra Modi.

This decision allows the BJP to act tough on Kashmir before a general election next year in which Modi will seek a second term in office, analysts said.

“What it [BJP] will do between now and elections is increase its political rhetoric against the separatists in Kashmir,” said Manoj Joshi from the New Delhi-based Observer Research Foundation.

“It will be political rhetoric of how the BJP will save the situation in the Kashmir region of the state,” he told AFP.

The decision means Modi's BJP controls one less state. But it will still govern 18 of India's 29 states outright or in coalitions.

The PDP, which draws its support from the mainly Muslim north of the state, has long demanded the removal of a draconian law that gives Indian forces sweeping powers to search, enter property and shoot on sight.

The BJP, whose base lies in the Hindu-dominated south, said the law was needed to curb separatists fighting for Kashmir's independence or for its merger with Pakistan.

The fighting has left tens of thousands of people, mostly civilians, dead.