BENGALURU - Indian shares posted their first weekly loss in four on fears of aggressive rate hikes by central banks globally, even as gains in auto and consumer goods companies helped stocks close higher on Friday.

The NSE Nifty 50 index ended up 0.69% at 16,049.20, while the S&P BSE Sensex rose 0.65% to 53,760.78, closing higher for the first time in five sessions. The benchmarks were down more than 1% for the week.

The auto index gained 2% on expectations for strong sales, while the fast-moving consumer goods index rose 1.5%, buoyed by weaker key raw material prices including wheat and palm oil.

"The (price) correction in several commodities is expected to bring back some of the lost margins for consumer companies. Also, monsoon rainfall is expected to be normal," said Saurabh Jain, assistant vice-president, research, at SMC Global Securities.

Prices for corn and wheat have retreated from near record highs hit in the aftermath of Russia's invasion of Ukraine earlier this year, while palm oil prices have hit multi-month lows on weaker demand.

The rupee hit a record low on Friday, continuing its downward spiral, as a weak outlook for global growth prompted investors to dump riskier assets, although easing crude prices limited its fall.

Foreign investors sold a net $464.25 million worth of Indian equities this week as of Thursday, 24.4% more compared with last week.

Shares of Syngene International ended up 4.4% after it signed a 10-year biologics manufacturing agreement with U.S.-listed animal health company Zoetis.

Meanwhile, world stocks attempted a move higher on Friday after four days of losses.

(Reporting by Nallur Sethuraman and Gaurav Dogra in Bengaluru; Editing by Vinay Dwivedi)