NEW DELHI — Violence disrupted the Indian election in the disputed Kashmir region on Monday, as separatist militants attacked two polling stations and the police responded with what residents called excessive force.

Militants in the Pulwama district hurled grenades at the polling stations, the police said, and protesters threw stones at security forces, hoping to shut down the voting, which is being conducted over five weeks throughout India. The police fired pellet guns in response, injuring at least a dozen people, according to residents.

The mountainous Kashmir region, whose people are mostly Muslim, has a history of contentious voting. It has been caught up in a longstanding, often brutal territorial dispute between Hindu-majority India, which controls much of the region, and Muslim-majority Pakistan.

Last week, the Indian police arrested or detained hundreds of people in southern Kashmir after separatist leaders called for the polls to be boycotted. Syed Ali Geelani, the chairman of a separatist organization, said in a statement that the elections were a “vast military exercise” and that the Indian state had overseen “ruthless killings” in Kashmir.