Benchmark Sensex rose for the fourth session today to perch near its all-time peak, powered by a sharp rally in IT bellwether TCS following strong quarterly results.

The BSE Sensex rose over 26 points to close at 36,265.93 -- just shy of its lifetime closing high of 36,283.25 hit on January 29. The 30-share barometer has now gained 691.38 points in just four sessions.

TCS spurted 5.47 per cent to its lifetime high of Rs 1,979.60, topping the Sensex gainers list, after the company yesterday posted a 23.4 per cent rise in consolidated net profit for the June quarter.

The better-than-expected numbers buoyed sentiment for the entire IT pack, with the BSE IT index gaining 2.38 per cent, outpacing its sectoral peers by a wide margin.

Domestic investor sentiment remains upbeat following a good start to the results season, offsetting a weak global trend, brokers said.

Asian markets went into a tailspin after the US said it will impose tariffs on an additional USD 200 billion of Chinese imports, ratcheting up global trade tensions.

Back home, the Sensex opened on a strong footing on optimistic buying by participants and touched a high of 36,362.30.

However, it shed some ground on profit-booking and slipped to touch a low of 36,169.70, before finally finishing at 36,265.93, up by 26.31 points, or 0.07 per cent.

The 50-share NSE Nifty too closed at 10,948.30, up just 1.05 points, or 0.01 per cent, after moving between 10,976.65 and 10,923.

"Improving outlook on IT index helped the market to keep its positive momentum while escalation in trade tensions between US and China capped the upside.

"Expectations of better Q1 result and decline in oil price will support market to prolong the current stability. Progressing monsoon and higher MSP gives leeway for consumption oriented sector to come to the limelight," said Vinod Nair, Head of Research, Geojit Financial Services.