NEW YORK - The dollar gained against the euro on Friday after European inflation hit a record high and U.S. consumer spending increased faster than expected.

But while the dollar was on track for its biggest quarterly gain since 2015 it was headed for its first weekly decline in three weeks.

Sterling fell against the dollar after three sessions of gains followed wild declines on concerns about Britain's plan to slash taxes and pay for it with more borrowing. After hitting a record low on Monday, the pound was on track for a weekly gain after the Bank of England bought British government bonds, known as gilts, on Wednesday, Thursday and Friday.

Data on Friday showed euro zone inflation zoomed past forecasts to hit 10.0% in September, reinforcing expectations for another jumbo European Central Bank rate hike next month.

The pound, after touching $1.1235, was last down 0.06% on the day at $1.1112.

The euro was down 0.3% at $0.9782. The greenback was up 0.13% against a basket of major currencies and on track for its biggest quarterly gain since the first quarter of 2015, recently showing a 7.3% gain.

But on a weekly basis the index was set for its first decline in three, last down 0.73%.

The U.S. Federal Reserve, which has raised U.S. borrowing costs faster in 2022 than any time since the 1980s, got one less reason to slow down. The Commerce Department said the personal consumption expenditures price index (PCE), which the Fed targets at 2%, rose 6.2% year-on-year in August.

"The inflation data today surprised higher once again. That will keep upward pressure on interest rates and the dollar," said Adam Button, chief currency analyst at Forexlive, a currency analysis firm in Toronto.

But on the last day of the quarter Button noted that "fundamental considerations often take a back seat", as investors work to balance their positions or take profits.

Foreign exchange volatility has surged recently as investors have been worried about inflation and economic growth in the face of aggressive global monetary tightening. Also fraying nerves has been the Britiah mini-budget fallout and concerns about escalation in the Russia-Ukraine war.

In a sign of the rush for the safety of the dollar, demand for the U.S. currency in derivative markets surged on Friday to its highest since the COVID-19 crisis in 2020.

So far this year, the dollar index has soared about 17%. For the month, the index was on track for a 3.4% gain, its strongest since April.

"We have seen some dollar selling into the latter portion of this week – but it feels like nothing more than some profit taking before another run to the top side, rather than any sign that the USD is actually topping out," said Joel Kruger, market strategist at LMAX.

The dollar was up 0.07% against the yen at 144.560 , and has been mostly tracking sideways below the psychological 145 line since early September and since Japanese officials stepped in to conduct their first yen buying intervention since 1998 last week.

Elsewhere, China's yuan on Friday briefly recouped losses from earlier in the week after Reuters reported the central bank had told major state-owned banks to be ready to support the currency in offshore trading.

The Swiss franc fell after the Swiss National Bank said it had intervened in the foreign exchange market in the second-quarter to support the currency. The dollar rose 0.54% versus the franc.

(Reporting by Sinéad Carew, additional reporting by Gertrude Chavez-Dreyfuss in New York, Tommy Reggiori Wilkes in London; Additional reporting by Kevin Buckland in Tokyo; Editing by Robert Birsel, Chizu Nomiyama and Alex Richardson)