rose on continued optimism about policy reforms by the new government.
Upstream oil and gas companies led the rally on expectation that the new business-friendly government of Prime Minister Narendra Modi would usher in substantial reforms.
Local shares were also underpinned by foreign fund inflows into equity markets for the fifth straight session on Thursday. Overseas investors bought shares worth 13.69 billion rupees ($230.8 million) on Thursday, provisional exchange data showed, taking their total purchases to $8.3 billion so far this year.
"The market is in a bull run and the momentum is expected to continue. Large overseas funds, which are coming into the market, are looking for quality companies with inherent strength such as ONGC. Most of the state-run companies are performing and are getting rerated. There could be intermediate corrections, which are good for the markets," said Deven Choksey, managing director, KR Choksey Securities.
The benchmark BSE index gained as much as 1.6 percent to hit an all-time high of 25,419.14. The index closed 1.51 percent higher at 25,396.46, posting a 4.9 percent gain for the week.
The broader NSE index surged as much as 1.59 percent to a record high of 7,592.70. The index closed 1.46 percent higher at 7,583.40, marking a 4.9 percent rise for the week.
Shares of Oil and Natural Gas Corp gained as much as 12.1 percent to an all-time high of 469.85 rupees. The stock closed 11.1 percent higher at 465.65 rupees, adding to the 1.9 percent gain on Thursday, amid continued hopes about reforms in the sector.
Shares in other oil and gas companies also gained with the BSE's oil and gas index closing 4.82 percent higher.
Reliance Industries Ltd advanced 2.98 percent, adding to its 1.2 percent gain on Thursday. Oil India Ltd rose 3.92 percent, while Gail India Ltd gained 7.94 percent.
Bluechips such as Housing Development Finance Corp rose 2.9 percent while Hero MotoCorp Ltd gained 3.9 percent.
State Bank of India closed 1.6 percent higher, while Mahindra and Mahindra Ltd ended up 2.5 percent.
Shares in other banks also gained. Kotak Mahindra Bank Ltd ended 3.9 percent higher, while Punjab National Bank closed up 2.7 percent.
Shares in sugar companies gained after the union food minister said India would examine raising import tax on the sweetener to support local prices and help mills clear dues to cane growers.
Shares in Shree Renuka Sugars Ltd gained 13.3 percent, while Balrampur Chini Mills Ltd closed 7.5 percent