Moreover, continued buying interest by foreign investors too lifted market sentiment, traders said.
Foreign investors bought shares worth around Rs 270 crore yesterday.
Global crude oil prices fell after a deal was reached between six major powers and Iran on its nuclear programme. With this, Tehran would be able to boost its oil exports.
Reaching to the news, the Sensex resumed higher at 28,022.14 and rose further to 28,218.37 before finishing at 28,198.29, showing a gain of 265.39 points or 0.95 per cent.
More From This Section
The rally was led by auto, IT and teck stocks on the back of good foreign fund inflows even as global cues were mixed.
The 50-share NSE Nifty recaptured the 8,500-level and went up to hit the day's peak of 8,531.40. It finally settled higher by 69.70 points or 0.82 per cent at 8,523.80.
On BSE, country's biggest carmaker Maruti Suzuki hit an all-time high of Rs 4,182 before settling 2.63 per cent higher at Rs 4,155.
Other blue-chips that supported the rally included Tata Motors, Wipro, TCS, M&M and Lupin.
Meanwhile, investors were keenly waiting for the US Fed Chair Janet Yellen's two-day testimony before the US Congress and voting on reform measures by the Greek parliament, both scheduled later in the day.
In overseas markets, European stocks reversed initial losses on expectations Greece's Parliament will approve a rescue deal. Key indices in the UK, Germany and France were up 0.01 per cent to 0.10 per cent.