BENGALURU, June 5 (Reuters) - Indian shares jumped 3% on Wednesday in a broad-based recovery after two key allies pledged their support to form a new government following a narrow win for Prime Minister Narendra Modi's alliance.

The NSE Nifty 50 index was up 3% at 22,542 points as of 02:35 p.m. IST, and the S&P BSE Sensex was up 2.9% at 74,147. The indexes fell 0.42 and 0.26% earlier in the session.

Modi is expected to be sworn-in for a record-equalling third term on June 8, after the Telugu Desam Party and Janata Dal (United) pledged their continued support a day after a humbling election verdict that saw his Bharatiya Janata Party lose its majority in parliament.

The benchmark indexes closed nearly 6% lower on Tuesday.

"The support pledged by the allies has given confidence to the market as there were uncertainties around this," said Deepak Jasani, Head of Retail Research at HDFC Securities.

Heavyweight bank stocks surged 4.1%, while the financial services index jumped 3.8%, driving a surge in the Nifty. Bank stocks dropped nearly 8% on Tuesday.

Some shorts being covered in banks due to weekly expiry has also driven the bank stocks up, Jasani said.

Meanwhile, foreign institutional investors (FIIs) sold a record 124.36 billion rupees (about $1.5 billion) worth of Indian shares on Tuesday, provisional data from the National Stock Exchange showed.

Until we have an idea about the policies of the new government, we may see some sector rotations, with defensive sectors like information technology and consumer goods doing better, said Neeraj Dewan, director at brokerage Quantum Securities.

Consumer goods stocks surged 4%, while auto stocks gained 4.2% on expectations of rural demand. IT stocks were up 2.4%.

IndusInd Bank surged 7.3% and was the top gainer in the Nifty 50 index.

Some analysts also said a fall in Indian equities could present an opportunity to buy stocks.

"Broad policy continuity, macroeconomic resilience and strong growth fundamentals should keep relative appeal for Indian equities intact," Goldman Sachs said in a note.

"We also expect foreign flows to return, given this event risk is behind us now, especially in the light of weak flows so far this year and multi-year low foreign positioning," Goldman said. (Reporting by Sethuraman NR in Bengaluru; Editing by Varun H K)