U.S. consumer spending rose a solid 0.4 percent in July, the sixth straight month of healthy gains. At the same time, a key gauge of inflation posted its sharpest annual gain in six years, likely keeping the Federal Reserve on track to keep raising interest rates gradually.

“We are watching consumer spending like a hawk because the economy won’t repeat the second quarter’s 4.2 percent fast pace without the consumer spending more of their tax cut money.”

The July spending gain, fueled by strong job growth and tax cuts, followed a similar 0.4 percent rise in June, the government said Thursday. Inflation, as measured by a barometer closely watched by the Fed, rose 2.3 percent for the 12 months that ended in July, the fastest year-over-year increase since 2012.

Though the inflation figure exceeded the Fed’s 2 percent target, its officials have said they’re willing to tolerate slightly higher inflation temporarily in light of a six-year period when it fell short of the Fed’s 2 percent goal. They are widely expected to keep gradually raising their benchmark rate, thereby leading to slightly higher rates on many consumer and business loans.

Andrew Hunter, U.S. economist at Capital Economics, said he thinks core inflation — which excludes the volatile components of energy and food — will exceed the Fed’s 2 percent target, “particularly with wage growth starting to show clearer signs of acceleration.”

Hunter predicted that the Fed will feel a need to keep raising rates once a quarter into next year.

Personal income, which provides the fuel for future spending increases, advanced by a moderate 0.3 percent in July after a 0.4 percent June increase. Modestly higher wages and salaries reflect an unemployment rate that has reached its lowest level in nearly 18 years.

The overall economy, as measured by the gross domestic product, grew at a 4.2 percent annual rate in the April-June quarter, which also reflected a solid rebound in consumer spending, after a lackluster performance in the first quarter. Economists are forecasting that GDP growth will slow slightly to a still solid 3 percent rate in the current quarter, supported by continued gains in consumer spending.

“We are watching consumer spending like a hawk because the economy won’t repeat the second quarter’s 4.2 percent fast pace without the consumer spending more of their tax cut money,” said Chris Rupkey, chief financial economist at MUFG Union Bank in New York.

The inflation rise in July, after a 2.2 percent rise in June, was driven by rising energy prices. A core inflation gauge that excludes energy and food was up 2 percent for the 12 months ending in July, up from a 1.9 percent year-over-year increase in June.

The Fed has raised its key rate twice this year and is projecting a total of four rate hikes for the full year, with the next one expected next month. President Donald Trump has recently let it be known that he is unhappy with the continued rate hikes. Trump has complained that the rate increases, intended to prevent inflation from rising too fast, are making it harder for the administration to achieve its goal of accelerating growth.

Central bank officials have said they plan to continue raising rates at a gradual pace despite the Trump criticism.

The personal saving rate dipped slightly to 6.7 percent of after-tax income in July, down from 6.8 percent in June.

In a separate report, the Labor Department said the number of Americans filing application for unemployment benefits rose by 3,000 last week but remained at a still-low level of 213,000, indicating a strong job market. A four-week average for claims, which are a proxy for layoffs, fell to its lowest point in nearly 49 years.

© The Associated Press. All rights reserved.