Rising energy prices, higher tuition and gains in lodging and housing costs pushed U.S inflation up moderately in July, the government said Friday in a report that could ease lingering worries on deflation.

The Consumer Price Index (search), the best-known U.S. inflation gauge, rose 0.2 percent in July, the same as in June, the Labor Department (search) said. Energy prices rose a solid 0.4 percent.

The so-called core CPI, which strips out volatile food and energy costs and gives a better read on underlying trends, also increased 0.2 percent, up from June's unchanged reading.

Wall Street economists had expected the overall CPI to advance 0.2 percent with the core rate up 0.1 percent. Markets showed little reaction to the figures.

While the climb in the core number was a bit steeper than expected, economists said the report still reflected benign inflation.

"The CPI numbers show inflation is still very tame. Looking at the breakdown of the report, it's clear we are still comfortably in a range at a low level of inflation," said Gary Thayer, chief economist at A.G. Edwards & Sons in St. Louis.

The department said its shelter index, which includes the cost of owning a home and hotel prices, rose 0.3 percent last month after barely budging in June. It said the gain accounted for about 85 percent of the acceleration in the core CPI.

Education and communication costs, which had fallen for four straight months, climbed a steep 0.5 percent, reflecting a sharp 0.7 percent increase in tuition.

Medical care costs continued to increase at a fast clip, gaining 0.5 percent last month. Tobacco prices, which had fallen in May and June, rose a steep 1.2 percent, which the department pinned largely on excise tax increases.

Transportation costs increased 0.2 percent, reflecting a 1.6 percent rise in airline fares and a 1.5 percent step up in fuel prices.

Clothing prices were flat in July and down a sharp 2.1 percent over the last 12 months. Recreation costs also held steady.

On Thursday, Labor said the producer price index, its gauge of prices at the wholesale level, last month crept up 0.1 percent overall and 0.2 percent excluding food and energy.

The reports should help alleviate concerns the U.S. economy could tip into deflation, a persistent decline in the overall level of consumer prices that could hurt the economy.

The 12-month advance in the core CPI held steady at a 1.5 percent gain, but the annualized 3-month change picked up smartly to post a 1.9 percent rise in contrast to the 1 percent increase reported a month ago.

At its last policy meeting Tuesday, the Federal Reserve (search) opted to leave overnight borrowing costs at a 45-year low of 1 percent as it continued to express concern over the potential for an "unwelcome fall in inflation" from already low levels.

Fed officials are worried a further slowing in inflation could sap some of the economic stimulus from low rates because it is inflation-adjusted rates that matter for growth.

"Given these numbers it is appropriate for the Fed to keep rates low for the time being. I don't see much market impact -- the report wasn't too far out of line with expectations," Thayer said.

The latest inflation report showed goods-producers still had little pricing power as the cost of non-energy, non-food goods slid 0.1 percent last month with the 12-month change holding steady at down 1.8 percent.

In contrast, the cost of services, stripping out energy-related prices, rose 0.3 percent in July and were up 2.9 percent over the last 12 months.