This is the highest closing for both the indices since May 15.
HDFC Bank was the top loser in the Sensex pack, falling 2.99 per cent, followed by Adani Ports at 2.87 per cent.
The fall came on the back of a massive selloff in NBFCs, led by DHFL which skidded over 50 per cent on fears of a liquidity crisis.
The NSE 50-share Nifty also closed higher by 61.60 points, or 0.59 per cent, at 10,504.80 after shuttling between 10,513 and 10,441.45.
The restraint on part of investors was chiefly because of RBI's minutes of its December policy meeting, which showed that some members were concerned about rising oil prices, its inflationary impact and possibility of fiscal slippage.
It was an extremely volatile session, borne out by the Sensex swinging over 1,200 points through the day and the Nifty 369 points.
The 50-issue NSE Nifty in range-bound movements settled higher by 59.15 points, or 0.58 per cent, at 10,252.10.
The Nifty finished the day at 10,265.65, a hefty gain of 98.95 points, or 0.97 per cent, after shuttling between 10,270.85 and 10,195.25.
The second half of June could be driven more or less by technical factors triggered by news flow from Greece, the US Federal Reserve and the monsoon. The technical picture seems bearish as of now, says Devangshu Datta.
The wider Nifty hit a low of 10,033.35 before finishing at 10,044.10, down 74.15 points or 0.73 per cent.
Yes Bank was the top gainer in the Sensex pack, surging 3.76 per cent, followed by SBI at 3.18 per cent.
The broader NSE Nifty closed 1.25 points, or 0.01 per cent down at 10,564.05.
Sustained FII inflows and fresh spell of buying by domestic institutional investors fuelled the rally
Profit-booking by participants in view of the domestic markets' recent record-setting run fuelled the downtrend
Covering-up of pending short positions on expiry of the July derivatives contracts and a strengthening rupee propped up the markets at high levels
Other than ITC, other laggards include PowerGrid, Infosys, M&M, NTPC, SBI, HDFC, Kotak Bank, HDFC Bank, TCS, Hero MotoCorp, Coal India, ONGC, RIL, Asian Paint, IndusInd Bank, ICICI Bank, Maruti Suzuki, Bajaj Auto, Tata Motors, Bharti Airtel and Axis Bank.
Small- and mid-cap stocks continued facing selling pressure due to stretched valuations.
Geo-political concerns over death of a Saudi journalist, Brexit and likely breach in Italy's budget also kept investors cautious.
The benchmark Sensex gained 4,642.84 points, or 16.%, while the broader NSE Nifty surged 1,572.85 points, or 18.20% during this period.
Sun Pharma was the biggest gainer in the Sensex pack, advancing 1.79 per cent.
The wider NSE Nifty touched a low of 10,652.40 before finishing at 10,671.40, showing a loss of 97.75 points, or 0.91 per cent.
The NSE Nifty cracked below the 10,800-mark to hit a low of 10,753.05 intra-day, before closing at 10,762.45 with a loss of 59.40 points, or 0.55 per cent.
The NSE Nifty, which dipped below the key 10,800-mark to touch a low of 10,755.40, bounced back on late buying to close at 10,817.70, up 9.65 points, or 0.09 per cent.
'It is easy to dramatise the events of today, but it is far more important to focus on the fact that we have a radically overvalued financial sector. It is a house of cards.'
MF investors may not be able to support markets fall if selling intensifies
The 50-share NSE Nifty too closed down 168.30 points, or 1.58 per cent, at 10,498.25 -- a level last seen on January 3 when it closed at 10,443.20.
This is its biggest single session fall since August 24, 2015, when it had lost 1,624.51 points.
The May Nifty option chain and the three-month Nifty chains offer several signals worth noting.
The derivatives expiry on Thursday is also expected to add to the volatility.
The broader Nifty ended on top of 9,800 again.
The broader NSE Nifty too reclaimed the key 11,500-mark. It touched a high of 11,562.25, before finally settling at 11,536.90, showing a gain of 59.95 points, or 0.52 per cent.
The Sensex has now lost 878.32 points in six sessions -- its longest string of losses in six months.
The session was marked by volatility and stock-specific action, even as the overall sentiment remains risk-averse, brokers said.
SBI had a bad day, sliding the most by 5.36%. Others that dragged the key indices down were M&M, Reliance Industries and L&T.
The broader NSE Nifty index too finished lower by 4.80 points, or 0.05 per cent, at 10,632.20.
Sentiment was hurt after market regulator Sebi directed bourses to initiate action against 331 suspected shell companies.
Investors booked profits in recent gainers
Sentiments took a hit after broader Asian markets weakened, following a renewed sell-off on Wall Street on Tuesday as energy shares dropped after crude oil prices plunged to a 13-month low amid weak earnings and US-China trade disputes, fuelling worries about economic growth
Both the indices ended at their highest levels since February 1.
The broader NSE Nifty moved between 10,705 and 10,785.55, before ending 25.15 points, or 0.23 per cent down at 10,716.55.