* India to inject $32.4 billion into state-owned banks
* Bank sector weighed down by record $145 bln soured loans
* Government faces series of local elections ahead of 2019 poll
* Small businesses starved of credit due to bad debt overhang
NEW DELHI/MUMBAI, Oct 26 (Reuters) - For three years, Prime Minister Narendra Modi had avoided the one step that everybody from central bank officials to credit rating agencies had implored him to take to fix the country's banking woes - a massive injection of cash.
So financial markets were stunned this week when the government unveiled a plan to pump a larger-than-expected $32.4 billion into state-run lenders, sending Indian equity markets soaring to record highs.
A tough political calendar and an economic downturn that threatens his party's electoral prospects had, in the end, left Modi little choice but to act.
The tipping point, according to a source close to the prime minister, came close to home: growing evidence that small and medium sized business in Gujarat, a core constituency in the state that elected Modi chief minister and propelled him on to the national stage in 2014, were being starved of credit.
"Gujarat is not a poor state, we cannot just dole some benefits: business has to be up and running in Gujarat," the Modi aide said.
Modi was already facing criticism from some businesses for the disruption to the economy caused by the shock removal of higher-value bills from circulation last year and the roll-out of a new national goods and services tax (GST).
Compounding the woes, business owners in his home state were telling Modi they could not get credit from banks, the aide said, a problem being felt throughout the country as state-run lenders struggle to tackle a record $145 billion in sour loans.
Gujarat will hold state elections in December.
The warnings from Gujarat crystallised the political reality facing Modi - in the months ahead 12 Indian states go to the polls, and the outcomes will set the stage for the ruling Bharatiya Janata Party's (BJP) bid for re-election in 2019.
The series of electoral tests comes as the economy has slowed to its slackest pace of growth in three years.
While many analysts praise the Modi government's economic reforms, they say it has been less successful in creating jobs - a key consideration in a country where millions of young people join the workforce each year - as small businesses that create the bulk of employment have been hit hard.
The Centre for Monitoring Indian Economy, a Mumbai-based think-tank, estimates about 2 million jobs have been lost in 2017, after the cash ban and the rollout of GST.
"There is negative attitude around the onslaught of reforms that have been rolled out in the last year," said Sunil Parekh, a strategic adviser to large industrial groups in Gujarat, adding that "resentment is very high in the state".
"The bank recapitalisation is not stimulus for micro, medium and small enterprises, but what it does is it eases their stress and gives banks a fresh opportunity to lend to distressed firms, as they try to improve their business."
Finance ministry spokesman D.S. Malik said there was no connection between the bank recapitalisation plan and any state election.
"This package is not for one state and is for the long-term benefit of the economy," he said.
NO SILVER BULLET
The $32.4 billion capital infusion is a step Modi's government had long been reluctant to take, despite pressure from economists and the Reserve Bank of India to act.
Modi has made prudent fiscal stewardship a key plank of his platform after the previous Congress-led government's inability to curb spending was widely seen contributing to India's worst economic crisis in more than two decades in 2013.
The government, according to the aide, was also reluctant to be seen as rewarding banks for reckless lending.
But the move carries risks for the government, since there is no guarantee that the injections will spur credit growth. Fitch Ratings estimates Indian banks need as much as $65 billion in additional capital by March 2019 just to meet new global regulatory rules.
Yet having decided to roll the dice, a series of critical decisions now loom. Chief among them is how the injection will be structured, with the bulk expected to come in the form of so-called recapitalisation bonds sold directly to banks.
The government will also need to figure out how to account for the injection so it does not increase the country's fiscal deficit - for example, by funding it through state-owned agencies.
Investors and commentators such as former central bank deputy governor H.R. Khan say the recapitalisation needs to be accompanied by strong banking sector reforms to ensure there is no repeat of the lax lending practices that caused the problem.
If the plan goes wrong, Modi could end up "owning" an issue the government has until now blamed on the previous Congress administration.
"The biggest risk is always implementation," said Arun Kejriwal, founder of financial firm Kejriwal Research and Investment Services. "If this kind of infusion is not done in a timely manner, it will end up being useless."
($1 = 64.8600 Indian rupees) (Additional reporting by Manoj Kumar and Neha Dasgupta in New Delhi and Abhirup Roy and Krishna Merchant of IFR in Mumbai)