The 30-share index, which had lost 169 points in the previous session, bounced back by 146.40 points to settle at 19,964.03 points.
The broad-based National Stock Exchange index Nifty rose by 37.35 points, or 0.62 per cent, to 6,039.20 points.
Brokers said oil processing and marketing companies were in demand after the government virtually deregulated diesel prices allowing "small" hikes over a period of time.
ONGC, which also bears a part of diesel subsidy bill, rose the most among Sensex stocks by 3.66 per cent. Oil refiner Reliance Industries shot up by 3.40 per cent.
Better quarter earnings by leading IT companies further supported the market sentiment, they added.
Also Read
Diesel prices in all probability may be hiked in the first instance that can be as early as tonight following the government decision that might to cut subsidy bill and reduce fiscal deficit, they said.
After Infosys and TCS, software solutions provider HCL Technologies today posted better-than-expected profit in October-December. HCL Tech rose by 4.31 per cent.
Infosys by 0.91 per cent as foreign investors remained net buyers of Indian stocks for the 13th straight day.
Among others, Hindustan Petroleum gained 6.06 per cent to Rs 345.60, Bharat Petroleum by 3.75 per cent to Rs 295.90, Indian Oil by 6.60 per cent to Rs 315.90, Oil India by 4.36 per cent to Rs 514.90 and Essar Oil by 5.06 per cent to Rs 76.85.