The trading at the National Stock Exchange (NSE), was marred by a technical glitch for more than four hours, forcing the exchange to extend the trading hours till late evening. At close, the NSE Nifty 50 index gained 274 points (1.9 per cent) to end near the mark of 15,000 at 14,982, while the Sensex of the BSE was up 1,030 points (2.1 per cent) and ended at 50,782.