At the closing bell, the blue-chip NSE Nifty 50 index was up 1.87% at 16,975.35, while the benchmark S&P BSE Sensex ended 1.86% higher at 56,816.65 points.

Both indexes opened higher after losing more than 1% in the previous session and kept the momentum through the day to close at their highest levels in three weeks.

The U.S. Federal Reserve will close the door on its ultra-easy pandemic-era monetary policy and step up the fight against stubbornly high inflation with the first in what is likely to be a series of interest rate hikes this year.

Domestic investors will keep a close watch on the U.S. Federal Reserve's stance and its implication for emerging markets.

The Indian rupee firmed on Wednesday, tracking gains in emerging market assets on the back of weak global crude oil prices.

The partially convertible rupee strengthened to as much as 76.2350 against the dollar.

Mumbai markets were also helped by world stocks, which recovered on Wednesday as markets watched for signs of progress in the Russian-Ukraine peace talks. [MKTS/GLOB]

In India trading, the Nifty Auto Index gained 2.2%, closing higher for a third straight session. The Nifty Bank Index was up 2.1% at close.

All other major sub-indexes ended in positive territory, with the Nifty energy index and the Nifty Metal Index rising 1.79% and 2.63%, respectively, tracking a surge in commodity prices.

Shares of Paytm parent One 97 Communications snapped a three-day losing streak to close 7.2% higher. The digital payments company had slumped to a record low on Tuesday as regulatory scrutiny on the firm tightened.

(Reporting by Shivani Singh in Bengaluru; Editing by Anil D'Silva)