Benchmark equity indices ended with gains on Wednesday, logging their fourth day of rally amid fresh foreign fund inflows and a mixed trend in global markets.

The gains in metal, realty, oil & gas and industrials stocks also supported the market's rally.

Rising for the fourth straight session, the 30-share BSE Sensex climbed 350.08 points or 0.56 per cent to settle at 63,142.96. During the day, it jumped 403.55 points or 0.64 per cent to 63,196.43.

The NSE Nifty advanced 127.40 points or 0.68 per cent to end at 18,726.40.

Also read: Rupee rises 5 paise to close at 82.55 against US dollar

From the Sensex pack, Nestle, Tata Steel, Tata Motors, Bharti Airtel, Larsen & Toubro, Power Grid, NTPC, Tata Consultancy Services, Tech Mahindra, Infosys, and Axis Bank were the major gainers.

Kotak Mahindra Bank, Maruti, Bajaj Finance, Mahindra & Mahindra, and ICICI Bank were the laggards.

In Asian markets, Seoul, Shanghai, and Hong Kong ended in the green, while Tokyo settled lower.

Equity markets in Europe were trading on a mixed note. The US markets ended in positive territory on Tuesday.

The Reserve Bank's rate-setting monetary policy panel began deliberations on Tuesday and the decision would be announced on June 8.

Also read: NSE, BSE battle it out for equity derivative market

"Investors are becoming more optimistic due to the anticipation of a positive revision in the RBI’s inflation forecast during the ongoing MPC meeting. It is expected that the RBI will maintain its pause on rate hikes, considering the significant improvement in inflation, which has now come within the RBI's comfort zone.

"Furthermore, the participation of FIIs as net buyers, after a brief halt, contributed to today's market rally, particularly driven by mid-and small-cap stocks," said Vinod Nair, Head of Research at Geojit Financial Services.

Global oil benchmark, Brent crude, climbed 0.10 per cent to $76.45 a barrel.

Foreign Institutional Investors (FIIs) bought equities worth ₹385.71 crore on Tuesday, according to exchange data.