The rupee weakened on Friday on worsening global risk sentiment, but posted its first weekly gain against the dollar in more than two months as the local currency recovers from oversold conditions.

The rupee has recovered since hitting a string of record lows last month, with the latest hit on May 31 when it dropped to 56.52 to the dollar, marking what so far has been a near-term bottom for the local currency.

Traders are becoming a little less pessimistic, with a Reuters poll showing bearish bets on the rupee fell after hitting a six-month high in May.

Widespread expectations the Reserve Bank of India (RBI) will cut interest rates on June 18 are helping spark some hope for the faltering domestic economy, though the rupee will likely remain beholden to global risk factors in the near-term.

The rupee is bouncing around as and when the euro moves, said Sudarshana Bhat, head of forex trading at Corporation Bank.

54.80 to 55.80 is the broad range for the next few days. RBI policy would be the next key trigger. If the RBI does cut rates, it would be rupee positive as it would boost stocks and help bring in flows, he added.

The partially convertible rupee closed at 55.42/43 per dollar as per SBI data, weaker than Thursday's close of 54.94/95.

The rupee still snapped a nine-week losing streak that had marked its longest losing run since the global financial crisis in 2008.

On Friday, the rupee suffered from falls in global risk assets on the back of the lack of clarity on potential U.S. monetary stimulus, worries China will post weak data on Saturday, and concerns about Spanish banking woes.

Traders also saw good dollar demand from oil firms, the largest buyers of dollars in the domestic currency markets, though that was partly offset as exporters stepped in to sell the greenback.

The one-month offshore non-deliverable forward contracts were at 55.76 while the three-month was 56.51.

In the currency futures market, the most-traded near-month dollar-rupee contracts on the National Stock Exchange, the MCX-SX and the United Stock Exchange all ended around 55.68 on a total volume of $4.6 billion.