Indian shares finished at record closing highs for the third session in a row on Tuesday, led by gains in technology firms and private banks, and boosted by strong domestic inflows as well as a climb in global equities.

The NSE Nifty 50 rose 0.39% to finish at 23,557.90, while the S&P BSE Sensex settled 0.40% higher at 77,301.14. The market was closed on Monday for a local holiday.

The two blue-chip indexes hit all-time highs in the session, as did the small- and mid-caps indexes, which ended with gains of 1.08% and 0.48%, respectively.

"(Share) price trends are in sync with the (earnings) growth outlook ... The positive bias for markets is very much intact at this juncture," said Pranav Haridasan, managing director and chief executive officer of Axis Securities.

"There's more comfort in large-caps from a valuations perspective. Banks, for instance, especially in the private sector space, we are really seeing them participate after recent underperformance."

Private banks advanced 1.1%, on the day. The index is up 0.7% so far this year, underperforming the 8.4% jump in the Nifty 50.

Domestic investors have bought shares worth 178.29 billion rupees (about $2.1 billion) so far in June, helping the markets recover from the election-related fall two weeks back and cushioning the volatility in foreign flows.

Global markets were trading higher ahead of comments from several U.S. Federal Reserve officials in the backdrop of higher expectations of a rate cut in September.

On the day, seven out of the 13 main sectoral indexes were higher. IT stocks gained 0.59%.

Wipro rose 3% after it said it extended its contract with Hanesbrands and announced a new one with GBST.

Coal India reversed losses to close 0.43% higher after Reuters reported that the company is exploring lithium blocks in Argentina along with a U.S. company.

On the flip side, Som Distilleries slid 6.21% after Indian police launched an investigation into the company on child labour. ($1 = 83.3940 Indian rupees) (Reporting by Bharath Rajeswaran in Bengaluru; Editing by Eileen Soreng and Savio D'Souza)