NEW YORK - The U.S. dollar index hit a five-week high and was on track for its biggest weekly gain since April 2020 on Friday as investors adjusted for the likelihood that the Federal Reserve will keep hiking rates to battle inflation.

The U.S. central bank needs to keep raising borrowing costs to tame decades-high inflation, a string of U.S. central bank officials said on Thursday, even as they debated how fast and how high to lift them.

"They still have their work cut out for them and I don’t think the market was really positioned that way after the July FOMC," said Bipan Rai, North American head of FX strategy at CIBC Capital Markets in Toronto.

The dollar index rose 0.36% to 107.96, its highest since July 15, while the euro dropped 0.32% to $1.0055, its lowest since the same date.

The dollar gained 0.81% to 137 against the yen, the strongest since July 27. Sterling tumbled 0.89% to $1.1830 and was set for its biggest weekly drop against the dollar since September 2020.

The Fed is seen as having more room to hike rates than central banks of other large economies which are more fragile. Fed funds futures traders are pricing in a 54% expectation that the Fed will hike rates by 50 basis points in September and a 46% probability of a 75 basis points increase.

Fed Chair Jerome Powell will update the market on his views at the annual Jackson Hole symposium on Aug. 25-27.

The dollar has also benefited from safe haven demand as weakening Chinese data and an energy crisis in Europe raise fears of further economic slowdown, said Jane Foley, head of FX strategy at Rabobank in London.

China's yuan slipped to its lowest since September 2020 at 6.8199 per dollar in onshore trading after the central bank set a much-weakened midpoint guidance, with traders expecting further downside.

In cryptocurrencies, bitcoin fell 7.3% to $21,523. Ether was down 8.08% to $1,699. "Weakness has seeped into the crypto sphere as speculators retreated from highly risky assets," said Susannah Streeter, senior investment and markets analyst at Hargreaves Lansdown.

(Additional reporting by Joice Alves in London; Editing by Alexander Smith)