BENGALURU, Dec 22 (Reuters) - Indian shares opened higher on Thursday, tracking gains in global equities following positive U.S. economic data, before erasing most of it on a broad-based decline across sectors, barring information technology and pharma which extended gains.

The Nifty 50 index was up 0.03% at 18,203.50, as of 09:30 a.m. IST, and the S&P BSE Sensex rose 0.02% at 61,078.28. Both indexes had gained over 0.6% in the opening minutes of the session.

IT and pharma extended gains for a second consecutive session, with the latter climbing after India's health minister on Wednesday said the pandemic is "not over yet".

All the other major sectoral indexes reversed opening gains.

Wall Street equities advanced sharply on Wednesday after data showed that consumer confidence in the world's largest economy rose to an eight-month high in December.

Asian markets also advanced after the bounce in U.S. shares, with the MSCI Asia ex Japan rising 1.49%.

Capping gains in the domestic equities were the hawkish remarks from the minutes of the RBI's December policy meeting minutes.

A majority of the monetary policy committee members said the RBI cannot "afford to prematurely pause its rate tightening cycle" with inflation remaining "unconscionably elevated".

India's retail inflation eased below the RBI's upper tolerance limit of 6% for the first time in 2022 in November, but core inflation stayed above 6%.

Among individual stocks, Sun Pharma, Bharti Airtel, and HCL Tech were among the top gainers in the Nifty 50 index.

($1 = 82.8800 Indian rupees)

(Reporting by Bharath Rajeswaran in Bengaluru; Editing by Eileen Soreng and Janane Venkatraman)