Mumbai, July 31 -- Indian equities posted their highest weekly gains in four months, aided by the return of foreign portfolio investors (FPIs), encouraging corporate earnings and a rebound in information technology (IT) and automobile stocks.

The Sensex ended Friday at 78,094.63, up 0.21%, while the Nifty 50 advanced 0.27% to 24,383.60. Over the week, the benchmarks gained 2.7% and 2.6%, respectively-their best performance since the week ended 10 April, when both indices had risen more than 5%.

IT stocks spearheaded the rally, with the BSE IT gaining 6.5% during the week. The BSE Auto Index rose 5.8%, while the consumer discretionary and consumer durables indices advanced 4% and 3.6%, respectively. Realty and metal stocks gained more th...