Anandiben Patel, who served as the state's first woman chief minister, posted the resignation letter on her Facebook page. She said the decision was driven by the fact that she was almost 75 years old, the age at which Modi expects ministers to retire.
Thousands protest attack on low-caste Indians
Modi appointed Patel as his successor in Gujarat, his home state, in 2014. He had run the state for 13 years - an era of rapid industrial growth that his Bharatiya Janata Party (BJP) successfully pitched to voters as a "model" to bring prosperity to India's 1.3 billion people.
But Patel's standing weakened after a series of caste-driven protests, which could be politically damaging for Modi. They have also disrupted parliamentary proceedings and may affect state elections in Gujarat and the northern state of Uttar Pradesh in 2017.
About 25,000 member of Dalit community have staged protests since four young Dalit men were stripped and beaten in public after they were seen skinning a cow. The youths said the cow was dead.
Dead cows left in west India as low-caste Dalits strike
Cows are considered sacred by Hindus. Killing them is banned in Gujarat, although villagers said the animal that sparked the attack on the youths had died of natural causes.
Modi's BJP party has sparked controversies over the past two years as opponents have accused it of intolerance and protested comments made by the party's right-wing members. That was seen as insensitive to religious minorities such as Muslims.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ