The Bombay Stock Exchange index, Sensex, which had gained 17 points yesterday, rose 80.68 points to 17,562.61.
Intra-day, it had touched a high of 17,702.26.
The broad-based National Stock Exchange index Nifty rose 18.45 points to 5,284.20, after climbing to 5,326.45.
Firm Asian stocks and upward trend in Europe on the Greek government's decision not to hold referendum on the bailout package, bolstered investor sentiment.
However, brokers said that emergence of profit selling by funds reduced the day's gains.
Infosys, Jindal Steel, Hero MotoCorp, SBI, HDFC Bank, ICICI Bank, Sterlite Industries, Sun Pharma and Tata Steel gained and pushed up the Sensex.
Of the 30 BSE index scrips, 22 gained while eight closed in the negative zone. Barring oil and gas, all sectoral indices made gains.
However, public sector oil marketing companies BPCL, HPCL and IOC gained after they hiked petrol prices, a move that will cut their subsidy burden.