Indian shares clinged on to early gains on Friday, supported by gains in consumer goods companies, but the benchmark indexes were headed for their first weekly loss in four on fears over aggressive rate hikes by central banks.

The NSE Nifty 50 index was up 0.3% at 15,985.20, as of 0509 GMT, while the S&P BSE Sensex rose 0.24% to 53,543.73.

Both the indexes are down more than 1% this week and on track for their first weekly loss in four.

The fast-moving consumer goods index rose 0.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 peaks hit in the aftermath of Russia's invasion of Ukraine earlier this year, while palm oil prices have hit multi-month lows on low demand.

The rupee extended losses into a fifth straight session, hitting a fresh low against the dollar on continued foreign fund outflows from stock market and a stronger greenback.

Foreign investors sold a net $464.25 million worth of Indian equities this week as of Thursday, 24.4% higher outflow compared with last week's disposal of $373.3 million.

Relentless selling of foreign investors have been one of the major reasons for markets not holding on to gains, said Jain.

Shares of Adani Ports and Special Economic Zone rose as much as 1.9%, after it won a port privatisation contract in Israel along with Gadot for $1.18 billion.

Meanwhile, Asian stocks hit a two-year low as a fresh slew of rate hikes around the world deepened concerns about the outlook for global economic growth. (Reporting by Nallur Sethuraman and Gaurav Dogra in Bengaluru; Editing by Rashmi Aich)