Shiv Sena chief Uddhav Thackeray with Prime Minister Narendra Modi, also a BJP leader.

The chief minister of India's western state of Maharashtra, the richest state in the country, resigned late on Wednesday, after a group in his ruling party defected to the opposition.

The resignation of Uddhav Thackeray, head of regional party Shiv Sena, will allow prime minister Narendra Modi's Bharatiya Janata Party (BJP) to form a government in the state as the defecting group transferred its allegiance to the BJP.

Maharashtra is the country's second most populous state and home to India's financial capital of Mumbai.