BENGALURU, Dec 30 (Reuters) - Indian shares settled at a record high for a third straight session on Wednesday, tracking upbeat investor sentiment globally and continued foreign inflows.

The NSE Nifty 50 index ended 0.35% higher at 13,981.95, while the benchmark S&P BSE Sensex rose 0.28% to 47,746.22. Both indexes opened at record levels but pulled back to swing between gains and losses for most part of the session.

Indian stocks have surged since the start of November, thanks to COVID-19 vaccine development and record levels of inflows from foreign institutional investors on liquidity-boosting measures from global central banks.

On Wednesday, other Asian markets also hit record highs, while European shares gained as Britain approved a COVID-19 vaccine developed by AstraZeneca and Oxford University.

"Positive news globally is supporting momentum. We are seeing continued foreign inflows," said Anand James, chief market strategist at Geojit Financial Services in Kochi.

"The 14,000 level has been a lighthouse or a magic number for the Nifty and it has been encouraging persistent buying."

Analysts have said while stocks remained overvalued, the market could continue to rise in the absence of any negative news.

The Nifty rose as much as 0.46% to 13,997 in late-afternoon trade before pulling back.

Bajaj Finance and ICICI Bank were the top boosts to the Nifty.

Auto and metal stocks advanced the most among Nifty's sub-indexes, with auto and metals closing up over 1% each.

Shares of AstraZeneca Plc's Indian arm closed up 2.5% after rising as much as 5.1%. (Reporting by Chandini Monnappa in Bengaluru; Editing by Sriraj Kalluvila)