BENGALURU, May 30 (Reuters) - Indian shares ended higher for a third straight session on Monday, riding on gains in technology stocks and a surge in automaker Mahindra and Mahindra after strong quarterly earnings.

The NSE Nifty 50 index closed 1.89% higher at 16,661.40, while the S&P BSE Sensex ended up 1.9% at 55,925.74. Both the indexes added more than 1% on Friday.

The market also benefited from an uptick in the global mood after news that Shanghai will cancel many conditions for businesses to resume work from Wednesday, easing a city-wide lockdown that began two months ago.

Mahindra and Mahindra rose 6.2% to a record high after it reported a 48% jump in quarterly profit.

This pushed the Nifty auto index up 2% to its highest in three months. Shares of Tata Motors added 3% after the Jaguar Land Rover owner said it could acquire Ford India's plant in Gujarat.

Technology stocks rose for a third session to notch a gain of 3.9%.

Stocks in India's $194-billion IT sector have taken a beating in recent months from growing investor worries about inflation, supply chain issues and the impact of the Ukraine war on client spending.

Of the fifty stocks on the Nifty 50, 45 closed higher and all the major sub-indexes settled in positive territory.

Realty stocks settled up 4.1% at a three-week high.

The Indian franchise partner of Domino's Pizza, Jubilant FoodWorks, rose 11% to a one-month high after March-quarter results.

Among the few decliners, Nifty component Sun Pharma dropped 1.73% after it reported a quarterly loss. (Reporting by Chandini Monnappa in Bengaluru; Editing by Aditya Soni)