The market had initially showed weakness in line with fall in Asian stocks on concerns over geopolitical tension after news that Malaysian airlines Jet downed at the Ukraine-Russia border.
Buying in banking and capital goods also aided the Sensex to rebound and end in the positive terrain, brokers said.
IT shares were in the limelight after country's largest software services exporter TCS announced better-than-expected quarter results late last evening, they added.
TCS was the second top gainer from the Sensex pack with a rise of 2.58 per cent. Wipro rose 1.83 per cent and Infosys 0.31 per cent.
Also Read
The BSE 30-share barometer resumed stable and later moved down to a low of 25,441.24 on weak Asian cues.
It afterwards recovered gradually and touched a high of 25,713.40 before finishing at 25,641.56, a net gain of 80.40 points or 0.31 per cent. Previously, it had closed at 26,100.08 on July 7.
The gauge has now gained over 634 points in four days. For the week, it has gained 617.21 points.
"The week saw benchmark indices rise by about 3 per cent as concerns on crude price eased. Monsoon also progressed during the week, easing worries on inflation. Quarterly results, especially from IT majors, were above estimates and improved sentiments," said Dipen Shah, Head- Private Client Group Research, Kotak Securities.
Meanwhile, Foreign Portfolio Investors bought shares worth Rs 1,912.42 crore yesterday, as per provisional data.
Key benchmark indices in Hong Kong, South Korea and Taiwan moved down by 0.07 per cent to 1.01 per cent while indices in China and Singapore moved up 0.11-0.17 per cent.
European stock markets were also trading lower as indices in France, Germany and the UK moved down by 0.30-0.72 per cent.