WASHINGTON (Reuters) – U.S. consumer prices rose in July and the underlying trend continued to strengthen, pointing to a steady increase in inflation pressures that keeps the Federal Reserve on track to gradually raise interest rates.

FILE PHOTO: A woman shops with her daughter at a Walmart Supercenter in Rogers, Arkansas, U.S., June 6, 2013. REUTERS/Rick Wilking/File Photo

The Labor Department said on Friday its Consumer Price Index advanced 0.2 percent, the bulk of which was due to a rise in the cost of shelter. The CPI rose 0.1 percent in June.

In the 12 months through July, the CPI increased 2.9 percent, matching the increase in June.

Excluding the volatile food and energy components, the CPI rose 0.2 percent, the same gain as in May and June. The annual increase in the so-called core CPI was 2.4 percent, the largest rise since September 2008, from 2.3 percent in June.

Economists polled by Reuters had forecast both the CPI and core CPI rising 0.2 percent in July.

U.S. Treasury yields held at three-week lows after the data while the dollar .DXY rose slightly against a basket of currencies. U.S. stock index futures were down.

The Fed more closely tracks a different inflation measure, the personal consumption expenditures (PCE) price index excluding food and energy, which increased 1.9 percent in June.

That gauge hit the U.S. central bank’s 2 percent target in March for the first time in more than six years and Fed policymakers have said they will not be unduly concerned if it overshoots its target in the coming months.

The U.S. central bank has raised rates twice this year, in March and June, and financial markets overwhelmingly expect a hike at the next policy meeting in September.

The Fed currently forecasts a total of four rate rises in 2018, with investors expecting a final nudge upwards of the year in the benchmark overnight lending rate in December.

Inflation pressures are seen continuing to build amid low unemployment and increasing difficulty reported by employers in filling positions. Rising raw material costs are also expected to push up inflation as manufacturers pay more, in part because of tariffs imposed by the Trump administration on lumber, aluminum and steel imports.

Owners’ equivalent rent of primary residence, which is what a homeowner would pay to rent or receive from renting a home, advanced 0.3 percent last month after increasing by the same margin in June. Overall, the so-called shelter index rose 3.5 percent in the 12 months through July.