(Reuters) - M Karunanidhi, five-time chief minister of India’s Tamil Nadu state and one of the dominant figures in the politics of southern India for half a century, died on Tuesday at the age of 94.

Slideshow ( 4 images )

An outspoken atheist in a country where politicians often trumpet their piety, Karunanidhi built his political machine as a crusader for social justice, with policies aimed at helping those at the bottom of India’s rigid Hindu caste hierarchy.

Thousands of his supporters were gathered outside the hospital in state capital Chennai to mourn his demise, as scores of policemen kept watch. Roads outside the hospital and at Karunanidhi’s residence were packed with people.

Karunanidhi, who led his party Dravida Munnetra Kazhagam (DMK) for about 50 years, had been treated in hospital since July 26 for age-related ailments including urinary tract infections.

His death comes less than two years after that of his bitter rival, actress-turned politician J Jayalalithaa, leaving a political void in the state.

“His understanding of policy and emphasis on social welfare stood out,” Prime Minister Narendra Modi tweeted following the veteran’s demise.

India’s two national parties, Modi’s ruling Bharatiya Janata Party and the opposition Congress, have little presence in Tamil Nadu, a state of nearly 70 million people where politics have been dominated by the DMK and Jayalalithaa’s AIADMK.

Karunanidhi, who always appeared in public with dark glasses and a yellow shawl draped on a shoulder, built his career fighting oppression by Brahmins, a priestly community at the top of the Hindu caste system.

He criticized organized religion and superstition and was known for his sharp wit, command over the Tamil language and populist schemes for those at the bottom of society.

Supporters on Twitter reminisced about how his scheme to offer free education to first-generation graduates had helped them. The iconoclastic leader also tried to install non-Brahmins as priests in temples.

He was known for drawing foreign investors to India’s second largest state economy, and oversaw the state becoming an industrial powerhouse, credited with opening many industrial and technology parks.

Karunanidhi, who wrote scripts for Tamil cinema before entering politics, faced allegations of corruption and nepotism. Many of his close family members served as lawmakers and his son M. K. Stalin is his de facto successor.

In one case involving an alleged loss to the state over construction of a bridge, police dragged Karunanidhi out of his home after midnight.

Pictures of the disheveled politician made it to the nation’s television screens, but police were not able to produce enough evidence and charges were dropped. He blamed the raid on his opponent Jayalalithaa who also faced allegations of graft and was found guilty of corruption after her death.