FILE- In this Aug. 2, 2018, file photo customers browse in an Apple store in New York. On Thursday, Aug. 30, the Commerce Department issues its July report on consumer spending, which accounts for roughly 70 percent of U.S. economic activity. (AP Photo/Mark Lennihan, File)

The Associated Press

WASHINGTON (AP) — 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.

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…